Split the large macro ISO_SYSAREA_REPORT_DOC into several parts ISO_SYSAREA_REPORT_DOC*

This commit is contained in:
Thomas Schmitt 2014-04-24 13:56:52 +02:00
parent ad279352e3
commit 3370f666f9
2 changed files with 42 additions and 17 deletions

View File

@ -5186,9 +5186,18 @@ int iso_image_report_boot_eqp(IsoImage *image, int what,
{ {
int ret; int ret;
char **doc; char **doc;
static char *sysarea_doc[] = {ISO_SYSAREA_REPORT_DOC};
static char *eltorito_doc[] = {ISO_ELTORITO_REPORT_DOC};
struct iso_impsysa_result *target = NULL; struct iso_impsysa_result *target = NULL;
static char *sysarea_doc[] = { ISO_SYSAREA_REPORT_DOC ,
ISO_SYSAREA_REPORT_DOC_MBR ,
ISO_SYSAREA_REPORT_DOC_GPT1 ,
ISO_SYSAREA_REPORT_DOC_GPT2 ,
ISO_SYSAREA_REPORT_DOC_APM ,
ISO_SYSAREA_REPORT_DOC_MIPS ,
ISO_SYSAREA_REPORT_DOC_SUN ,
ISO_SYSAREA_REPORT_DOC_HPPA ,
"@END_OF_DOC@" };
static char *eltorito_doc[] = { ISO_ELTORITO_REPORT_DOC ,
"@END_OF_DOC@" };
if (flag & (1 << 15)) if (flag & (1 << 15))
return iso_report_result_destroy(result, 0); return iso_report_result_destroy(result, 0);

View File

@ -3693,12 +3693,13 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
#define ISO_MAX_SYSAREA_LINE_LENGTH 4096 #define ISO_MAX_SYSAREA_LINE_LENGTH 4096
/** /**
* Text which describes the output format of iso_image_report_system_area(). * Texts which describe the output format of iso_image_report_system_area().
* It is publicly defined here only as part of the API description. * They are publicly defined here only as part of the API description.
* Do not use it as macro in your application but rather call * Do not use these macros in your application but rather call
* iso_image_report_system_area() with flag bit0. * iso_image_report_system_area() with flag bit0.
*/ */
#define ISO_SYSAREA_REPORT_DOC \ #define ISO_SYSAREA_REPORT_DOC \
\
"Report format for recognized System Area data.", \ "Report format for recognized System Area data.", \
"", \ "", \
"No text will be reported if no System Area was loaded or if it was", \ "No text will be reported if no System Area was loaded or if it was", \
@ -3715,7 +3716,9 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" not-recognized, GPT, APM }", \ " not-recognized, GPT, APM }", \
" ISO image size/512 : decimal", \ " ISO image size/512 : decimal", \
" size of ISO image in block units of 512 bytes.", \ " size of ISO image in block units of 512 bytes.", \
"", \ ""
#define ISO_SYSAREA_REPORT_DOC_MBR \
\
"If an MBR is detected, with at least one partition entry of non-zero size,", \ "If an MBR is detected, with at least one partition entry of non-zero size,", \
"then there may be:", \ "then there may be:", \
" Partition offset : decimal", \ " Partition offset : decimal", \
@ -3736,7 +3739,9 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" PReP boot partition: decimal decimal", \ " PReP boot partition: decimal decimal", \
" gives start block and size of a PReP boot partition in ISO 9660", \ " gives start block and size of a PReP boot partition in ISO 9660", \
" block units of 2048 bytes.", \ " block units of 2048 bytes.", \
"", \ ""
#define ISO_SYSAREA_REPORT_DOC_GPT1 \
\
"GUID Partition Table can coexist with MBR:", \ "GUID Partition Table can coexist with MBR:", \
" GPT : N Info", \ " GPT : N Info", \
" headline for GPT partition table. The fields are too wide for a", \ " headline for GPT partition table. The fields are too wide for a", \
@ -3772,7 +3777,10 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" covering the whole GPT block range for partitions.", \ " covering the whole GPT block range for partitions.", \
" GPT lba range : decimal decimal decimal", \ " GPT lba range : decimal decimal decimal", \
" addresses of first payload block, last payload block, and of the", \ " addresses of first payload block, last payload block, and of the", \
" GPT backup header block. 512 bytes per block.", \ " GPT backup header block. 512 bytes per block." \
#define ISO_SYSAREA_REPORT_DOC_GPT2 \
\
" GPT partition name : X hex_digits", \ " GPT partition name : X hex_digits", \
" up to 144 hex digits giving the UTF-16LE name byte string of", \ " up to 144 hex digits giving the UTF-16LE name byte string of", \
" partition X. Trailing 16 bit 0-characters are omitted.", \ " partition X. Trailing 16 bit 0-characters are omitted.", \
@ -3795,8 +3803,10 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" GPT partition path : X path", \ " GPT partition path : X path", \
" the path of a file in the ISO image which begins at the partition", \ " the path of a file in the ISO image which begins at the partition", \
" start block of partition X.", \ " start block of partition X.", \
"", \ ""
"Apple partition map can coexist with MBR:", \ #define ISO_SYSAREA_REPORT_DOC_APM \
\
"Apple partition map can coexist with MBR and GPT:", \
" APM : N Info", \ " APM : N Info", \
" headline for human readers.", \ " headline for human readers.", \
" APM block size : decimal", \ " APM block size : decimal", \
@ -3814,7 +3824,9 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" APM partition path : X path", \ " APM partition path : X path", \
" the path of a file in the ISO image which begins at the partition", \ " the path of a file in the ISO image which begins at the partition", \
" start block of partition X.", \ " start block of partition X.", \
"", \ ""
#define ISO_SYSAREA_REPORT_DOC_MIPS \
\
"If a MIPS Big Endian Volume Header is detected, there may be:", \ "If a MIPS Big Endian Volume Header is detected, there may be:", \
" MIPS-BE volume dir : N Name Block Bytes", \ " MIPS-BE volume dir : N Name Block Bytes", \
" headline for human readers.", \ " headline for human readers.", \
@ -3837,7 +3849,9 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" MIPS-LE elf offset : decimal", \ " MIPS-LE elf offset : decimal", \
" tells the relative 512-byte block offset inside the boot file:", \ " tells the relative 512-byte block offset inside the boot file:", \
" SegmentStart - FileStartBlock", \ " SegmentStart - FileStartBlock", \
"", \ ""
#define ISO_SYSAREA_REPORT_DOC_SUN \
\
"If a SUN SPARC Disk Label is present:", \ "If a SUN SPARC Disk Label is present:", \
" SUN SPARC disklabel: text", \ " SUN SPARC disklabel: text", \
" tells the disk label text.", \ " tells the disk label text.", \
@ -3850,7 +3864,9 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" SPARC GRUB2 path : path", \ " SPARC GRUB2 path : path", \
" tells the path to the data file in the ISO image which belongs to the", \ " tells the path to the data file in the ISO image which belongs to the", \
" address given by core.", \ " address given by core.", \
"", \ ""
#define ISO_SYSAREA_REPORT_DOC_HPPA \
\
"If a HP-PA PALO boot sector version 4 or 5 is present:", \ "If a HP-PA PALO boot sector version 4 or 5 is present:", \
" PALO header version: decimal", \ " PALO header version: decimal", \
" tells the PALO header version: 4 or 5.", \ " tells the PALO header version: 4 or 5.", \
@ -3866,7 +3882,7 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
" tells the same for the ramdisk file.", \ " tells the same for the ramdisk file.", \
" HP-PA bootloader : decimal decimal path", \ " HP-PA bootloader : decimal decimal path", \
" tells the same for the bootloader file.", \ " tells the same for the bootloader file.", \
"@END_OF_DOC@" ""
/** /**
* Obtain an array of texts describing the detected properties of the * Obtain an array of texts describing the detected properties of the
@ -3896,7 +3912,7 @@ int iso_image_get_system_area(IsoImage *img, char data[32768],
* @param flag * @param flag
* Bitfield for control purposes * Bitfield for control purposes
* bit0= do not report system area but rather reply a copy of * bit0= do not report system area but rather reply a copy of
* above text line array ISO_SYSAREA_REPORT_DOC. * above text line arrays ISO_SYSAREA_REPORT_DOC*.
* With this bit it is permissible to submit image as NULL. * With this bit it is permissible to submit image as NULL.
* bit15= dispose result from previous call. * bit15= dispose result from previous call.
* @return * @return
@ -3935,7 +3951,7 @@ int iso_image_report_system_area(IsoImage *image,
" \"g\"=GRUB2 boot info, \"-\"=feature not present", \ " \"g\"=GRUB2 boot info, \"-\"=feature not present", \
" - LBA: start block number in ISO filesystem (2048-block).", \ " - LBA: start block number in ISO filesystem (2048-block).", \
"", \ "", \
"The following lines may be omitted from the report:", \ "The following lines appear conditionally:", \
" El Torito cat path : iso_rr_path", \ " El Torito cat path : iso_rr_path", \
" tells the path to the data file in the ISO image which belongs to", \ " tells the path to the data file in the ISO image which belongs to", \
" the block address where the boot catalog starts.", \ " the block address where the boot catalog starts.", \
@ -3950,7 +3966,7 @@ int iso_image_report_system_area(IsoImage *image,
" tells the path to the data file in the ISO image which belongs to", \ " tells the path to the data file in the ISO image which belongs to", \
" the block address given by LBA of boot image X.", \ " the block address given by LBA of boot image X.", \
" (This line is not reported if no path points to that block.)", \ " (This line is not reported if no path points to that block.)", \
"@END_OF_DOC@" ""
/** /**
* Obtain an array of texts describing the detected properties of the * Obtain an array of texts describing the detected properties of the