Some little bug fix, related to thing I forget to change.
This commit is contained in:
parent
ab7ea855f6
commit
7d6c80b880
@ -35,7 +35,7 @@ int get_iso_name(Ecma119Image *img, IsoNode *iso, char **name)
|
||||
|
||||
ret = str2ascii(img->input_charset, iso->name, &ascii_name);
|
||||
if (ret < 0) {
|
||||
iso_msg_submit(img->image->id, ret, "Can't convert %s", iso->name);
|
||||
iso_msg_submit(img->image->id, ret, 0, "Can't convert %s", iso->name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ int create_file(Ecma119Image *img, IsoFile *iso, Ecma119Node **node)
|
||||
|
||||
size = iso_stream_get_size(iso->stream);
|
||||
if (size > (off_t)0xffffffff) {
|
||||
return iso_msg_submit(img->image->id, ISO_FILE_TOO_BIG,
|
||||
return iso_msg_submit(img->image->id, ISO_FILE_TOO_BIG, 0,
|
||||
"File \"%s\" can't be added to image because "
|
||||
"is greater than 4GB", iso->node.name);
|
||||
}
|
||||
@ -298,12 +298,12 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
if (!image->rockridge) {
|
||||
if ((iso->type == LIBISO_DIR && depth > 8) && !image->allow_deep_paths) {
|
||||
free(iso_name);
|
||||
return iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG,
|
||||
return iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG, 0,
|
||||
"File \"%s\" can't be added, because directory depth "
|
||||
"is greater than 8.", iso->name);
|
||||
} else if (max_path > 255 && !image->allow_longer_paths) {
|
||||
free(iso_name);
|
||||
return iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG,
|
||||
return iso_msg_submit(image->image->id, ISO_FILE_IMGPATH_WRONG, 0,
|
||||
"File \"%s\" can't be added, because path length "
|
||||
"is greater than 255 characters", iso->name);
|
||||
}
|
||||
@ -318,7 +318,7 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
ret = create_symlink(image, (IsoSymlink*)iso, &node);
|
||||
} else {
|
||||
/* symlinks are only supported when RR is enabled */
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED, 0,
|
||||
"File \"%s\" ignored. Symlinks need RockRidge extensions.",
|
||||
iso->name);
|
||||
}
|
||||
@ -328,7 +328,7 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
ret = create_special(image, (IsoSpecial*)iso, &node);
|
||||
} else {
|
||||
/* symlinks are only supported when RR is enabled */
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED, 0,
|
||||
"File \"%s\" ignored. Special files need RockRidge extensions.",
|
||||
iso->name);
|
||||
}
|
||||
@ -338,7 +338,7 @@ int create_tree(Ecma119Image *image, IsoNode *iso, Ecma119Node **tree,
|
||||
ret = create_boot_cat(image, (IsoBoot*)iso, &node);
|
||||
} else {
|
||||
/* log and ignore */
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(image->image->id, ISO_FILE_IGNORED, 0,
|
||||
"El-Torito catalog found on a image without El-Torito.",
|
||||
iso->name);
|
||||
}
|
||||
|
@ -151,10 +151,10 @@
|
||||
#define ISO_FILE_CANT_WRITE 0xE030FF73
|
||||
|
||||
/* Can't convert filename to requested charset (HINT,MEDIUM, -142) */
|
||||
#define ISO_FILENAME_WRONG_CHARSET 0xC020FF74
|
||||
#define ISO_FILENAME_WRONG_CHARSET 0xC020FF72
|
||||
|
||||
/* File can't be added to the tree (WARNING,MEDIUM, -143) */
|
||||
#define ISO_FILE_CANT_ADD 0xD020FF73
|
||||
#define ISO_FILE_CANT_ADD 0xD020FF71
|
||||
|
||||
/**
|
||||
* File path break specification constraints and will be ignored
|
||||
|
@ -39,7 +39,7 @@ int get_iso1999_name(Ecma119Image *t, const char *str, char **fname)
|
||||
} else {
|
||||
ret = strconv(str, t->input_charset, t->output_charset, &name);
|
||||
if (ret < 0) {
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILENAME_WRONG_CHARSET,
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILENAME_WRONG_CHARSET, ret,
|
||||
"Charset conversion error. Can't convert %s from %s to %s",
|
||||
str, t->input_charset, t->output_charset);
|
||||
if (ret < 0) {
|
||||
@ -119,7 +119,7 @@ int create_node(Ecma119Image *t, IsoNode *iso, Iso1999Node **node)
|
||||
size = iso_stream_get_size(file->stream);
|
||||
if (size > (off_t)0xffffffff) {
|
||||
free(n);
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_TOO_BIG,
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_TOO_BIG, 0,
|
||||
"File \"%s\" can't be added to image because is "
|
||||
"greater than 4GB", iso->name);
|
||||
return 0;
|
||||
@ -186,7 +186,7 @@ int create_tree(Ecma119Image *t, IsoNode *iso, Iso1999Node **tree, int pathlen)
|
||||
max_path = pathlen + 1 + (iso_name ? strlen(iso_name): 0);
|
||||
if (!t->allow_longer_paths && max_path > 255) {
|
||||
free(iso_name);
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_IMGPATH_WRONG,
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_IMGPATH_WRONG, 0,
|
||||
"File \"%s\" can't be added to ISO 9660:1999 tree, "
|
||||
"because its path length is larger than 255", iso->name);
|
||||
}
|
||||
@ -229,14 +229,14 @@ int create_tree(Ecma119Image *t, IsoNode *iso, Iso1999Node **tree, int pathlen)
|
||||
ret = create_node(t, iso, &node);
|
||||
} else {
|
||||
/* log and ignore */
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED, 0,
|
||||
"El-Torito catalog found on a image without El-Torito.",
|
||||
iso->name);
|
||||
}
|
||||
break;
|
||||
case LIBISO_SYMLINK:
|
||||
case LIBISO_SPECIAL:
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED, 0,
|
||||
"Can't add %s to ISO 9660:1999 tree. This kind of files "
|
||||
"can only be added to a Rock Ridget tree. Skipping.",
|
||||
iso->name);
|
||||
|
@ -113,7 +113,7 @@ int create_node(Ecma119Image *t, IsoNode *iso, JolietNode **node)
|
||||
size = iso_stream_get_size(file->stream);
|
||||
if (size > (off_t)0xffffffff) {
|
||||
free(joliet);
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_TOO_BIG,
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_TOO_BIG, 0,
|
||||
"File \"%s\" can't be added to image because is "
|
||||
"greater than 4GB", iso->name);
|
||||
}
|
||||
@ -182,7 +182,7 @@ int create_tree(Ecma119Image *t, IsoNode *iso, JolietNode **tree, int pathlen)
|
||||
* Wow!! Joliet is even more restrictive than plain ISO-9660,
|
||||
* that allows up to 255 bytes!!
|
||||
*/
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_IMGPATH_WRONG,
|
||||
return iso_msg_submit(t->image->id, ISO_FILE_IMGPATH_WRONG, 0,
|
||||
"File \"%s\" can't be added to Joliet tree, because "
|
||||
"its path length is larger than 240", iso->name);
|
||||
}
|
||||
@ -225,14 +225,14 @@ int create_tree(Ecma119Image *t, IsoNode *iso, JolietNode **tree, int pathlen)
|
||||
ret = create_node(t, iso, &node);
|
||||
} else {
|
||||
/* log and ignore */
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED, 0,
|
||||
"El-Torito catalog found on a image without El-Torito.",
|
||||
iso->name);
|
||||
}
|
||||
break;
|
||||
case LIBISO_SYMLINK:
|
||||
case LIBISO_SPECIAL:
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED,
|
||||
ret = iso_msg_submit(t->image->id, ISO_FILE_IGNORED, 0,
|
||||
"Can't add %s to Joliet tree. This kind of files can only"
|
||||
" be added to a Rock Ridget tree. Skipping.", iso->name);
|
||||
break;
|
||||
|
@ -266,7 +266,7 @@ char *get_rr_fname(Ecma119Image *t, const char *str)
|
||||
ret = strconv(str, t->input_charset, t->output_charset, &name);
|
||||
if (ret < 0) {
|
||||
/* TODO we should check for possible cancelation */
|
||||
iso_msg_submit(t->image->id, ISO_FILENAME_WRONG_CHARSET,
|
||||
iso_msg_submit(t->image->id, ISO_FILENAME_WRONG_CHARSET, ret,
|
||||
"Charset conversion error. Can't convert %s from %s to %s",
|
||||
str, t->input_charset, t->output_charset);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user