Displaying 3 results from an estimated 3 matches for "bendian_short".
2014 Jun 22
0
[PATCH 2/6] utils/isohybrid.c: Correct blocking factor in APM partition block counts
...s/isohybrid.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/utils/isohybrid.c b/utils/isohybrid.c
index c5b4281..7d0864e 100644
--- a/utils/isohybrid.c
+++ b/utils/isohybrid.c
@@ -842,7 +842,7 @@ initialise_apm(uint8_t *gpt, uint32_t start)
part->signature = bendian_short(0x504d);
part->map_count = bendian_int(apm_parts);
part->start_block = bendian_int(1);
- part->block_count = bendian_int(0x10);
+ part->block_count = bendian_int(4);
strcpy(part->name, "Apple");
strcpy(part->type, "Apple_partition_map"...
2011 Aug 05
3
isolinux: Generate GPT and Mac bootable images
...break;
+ case 'u':
+ mode |= EFI;
+ break;
+
+ case 'm':
+ mode |= MAC;
+ break;
+
case 'v':
mode |= VERBOSE;
break;
@@ -207,6 +364,33 @@ check_option(int argc, char *argv[])
return optind;
}
+uint16_t
+bendian_short(const uint16_t s)
+{
+ uint16_t r = 1;
+
+ if (!*(uint8_t *)&r)
+ return s;
+
+ r = (s & 0x00FF) << 8 | (s & 0xFF00) >> 8;
+
+ return r;
+}
+
+
+uint32_t
+bendian_int(const uint32_t s)
+{
+ uint32_t r = 1;
+
+ if (!*(uint8_t *)&r)
+ return...
2014 Jun 22
16
Announcing a patch series for isohybrid.c
Hi,
following will be 6 patch proposals for isohybrid.c
1: Encode GPT partition names as UTF-16LE
2: Correct blocking factor in APM partition block counts
3: Correct end block address of first GPT partition
4: Write GPT backup to the very end of the image
5: Change all fseek(3) to fseeko(3)
6: Introduce option --mbr and make isohybrid.c compilable standalone
If the form needs adjustments,