From e8f1dfb8e53b6f4bee46725a98d40e9ee9e10a4e Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 13 Jan 2009 20:44:36 +0100 Subject: [PATCH] Silenced warning about multiple ER fields. Enabled recognizing of AAIP-ER. Vreixo needs to explain TODO #00016 in fs_image.c --- libisofs/fs_image.c | 25 ++++++++++++++++++++++--- libisofs/rockridge.c | 5 ++++- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/libisofs/fs_image.c b/libisofs/fs_image.c index 349bddf..3274f84 100644 --- a/libisofs/fs_image.c +++ b/libisofs/fs_image.c @@ -1855,6 +1855,9 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block) if (SUSP_SIG(sue, 'E', 'R')) { +#ifndef Libisofs_with_aaiP + /* ts A90113 : this warning is not appropriate any more */ + if (data->rr_version) { ret = iso_msg_submit(data->msgid, ISO_SUSP_MULTIPLE_ER, 0, "More than one ER has found. This is not supported. " @@ -1865,6 +1868,8 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block) } } +#endif /* ! Libisofs_with_aaiP */ + /* * it seems that Rock Ridge can be identified with any * of the following @@ -1884,11 +1889,25 @@ int read_root_susp_entries(_ImageFsData *data, uint32_t block) iso_msg_debug(data->msgid, "Suitable Rock Ridge ER found. Version 1.12."); data->rr_version = RR_EXT_112; + +#ifdef Libisofs_with_aaiP +/* ts A90113 */ + + } else if ( (sue->data.ER.len_id[0] == 9 && + !strncmp((char*)sue->data.ER.ext_id, "AAIP_0002", 9)) ) { + + iso_msg_debug(data->msgid, + "Arbitrary Attribute ER found. Version 0.2."); + + /* >>> register the presence of AAIP and the signature word */; + +#endif /* Libisofs_with_aaiP */ + } else { ret = iso_msg_submit(data->msgid, ISO_SUSP_MULTIPLE_ER, 0, - "Not Rock Ridge ER found.\n" - "That will be ignored, but can cause problems in " - "image reading. Please notify us about this"); + "Non-Rock-Ridge ER found.\n" + "It will be ignored, but can cause problems in " + "image reading. Please notify us about this."); if (ret < 0) { break; } diff --git a/libisofs/rockridge.c b/libisofs/rockridge.c index 546c6a5..b416426 100644 --- a/libisofs/rockridge.c +++ b/libisofs/rockridge.c @@ -848,7 +848,7 @@ size_t rrip_calc_len(Ecma119Image *t, Ecma119Node *n, int type, size_t space, } #ifdef Libisofs_with_aaiP -/* ts A90112 */ + /* ts A90112 */ aapt = NULL; #ifdef Libisofs_with_aaip_dummY @@ -883,6 +883,7 @@ size_t rrip_calc_len(Ecma119Image *t, Ecma119Node *n, int type, size_t space, *ce = 182; /* ER of RRIP */ #ifdef Libisofs_with_aaiP + /* ts A90113 */ #ifdef Libisofs_with_aaip_dummY @@ -1335,6 +1336,7 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type, */ #ifdef Libisofs_with_aaiP + /* ts A90113 */ #ifdef Libisofs_with_aaip_dummY @@ -1363,6 +1365,7 @@ int rrip_get_susp_fields(Ecma119Image *t, Ecma119Node *n, int type, #ifdef Libisofs_with_aaip_dummY + /* ts A90113 */ ret = aaip_add_ER(t, info, "AA", 0); if (ret < 0) { goto add_susp_cleanup;