New error code ISO_BOOT_NO_CATALOG

This commit is contained in:
Thomas Schmitt 2010-06-23 19:54:51 +02:00
parent 281462802f
commit 1d6fdf51dc
3 changed files with 15 additions and 4 deletions

View File

@ -653,6 +653,8 @@ int iso_image_add_boot_image(IsoImage *image, const char *image_path,
struct el_torito_boot_catalog *catalog = image->bootcat;
ElToritoBootImage *boot_img;
if(catalog == NULL)
return ISO_BOOT_NO_CATALOG;
if (catalog->num_bootimages >= Libisofs_max_boot_imageS)
return ISO_BOOT_IMAGE_OVERFLOW;
ret = create_image(image, image_path, type, &boot_img);

View File

@ -2354,6 +2354,8 @@ int iso_image_set_boot_image(IsoImage *image, const char *image_path,
* See iso_image_set_boot_image
* @return
* 1 on success, < 0 on error
* ISO_BOOT_NO_CATALOG means iso_image_set_boot_image()
* was not called first.
*
* @since 0.6.32
*/
@ -2361,8 +2363,6 @@ int iso_image_add_boot_image(IsoImage *image, const char *image_path,
enum eltorito_boot_media_type type, int flag,
ElToritoBootImage **boot);
/* TODO #00026 : add support for "hidden" bootable images. */
/**
* Get the El-Torito boot catalog and the default boot image of an ISO image.
*
@ -2474,12 +2474,11 @@ int iso_image_set_boot_catalog_weight(IsoImage *image, int sort_weight);
* @return
* 0= no boot catalog attached , 1= ok , <0 = error
*
* @since 0.6.32
* @since 0.6.34
*/
int iso_image_set_boot_catalog_hidden(IsoImage *image, int hide_attrs);
/**
* Get the boot media type as of parameter "type" of iso_image_set_boot_image()
* resp. iso_image_add_boot_image().
@ -3724,6 +3723,10 @@ int iso_tree_get_follow_symlinks(IsoImage *image);
* when adding a directory recursively.
* Default behavior is to not ignore them.
*
* Clarification: This is not related to the IsoNode property to be hidden
* in one or more of the resulting image trees as of
* IsoHideNodeFlag and iso_node_set_hidden().
*
* @since 0.6.2
*/
void iso_tree_set_ignore_hidden(IsoImage *image, int skip);
@ -5756,6 +5759,10 @@ int iso_md5_match(char first_md5[16], char second_md5[16]);
/** Too many boot images (FAILURE,HIGH, -69) */
#define ISO_BOOT_IMAGE_OVERFLOW 0xE830FFBA
/** No boot catalog created yet ((FAILURE,HIGH, -70) */ /* @since 0.6.34 */
#define ISO_BOOT_NO_CATALOG 0xE830FFB9
/**
* Error on file operation (FAILURE,HIGH, -128)
* (take a look at more specified error codes below)

View File

@ -284,6 +284,8 @@ const char *iso_error_to_msg(int errcode)
return "Detected file content changes while it was written into the image";
case ISO_SCDBACKUP_TAG_NOT_0:
return "Session does not start at LBA 0. scdbackup checksum tag not written.";
case ISO_BOOT_NO_CATALOG:
return "No boot catalog created yet";
default:
return "Unknown error";
}