search for: gpt_size

Displaying 9 results from an estimated 9 matches for "gpt_size".

Did you mean: gdt_size
2011 Aug 05
3
isolinux: Generate GPT and Mac bootable images
.../2048 - 10); + part->status = bendian_int(0x01); + } +} + int main(int argc, char *argv[]) { int i = 0; FILE *fp = NULL; - struct stat isostat; uint8_t *buf = NULL, *bufz = NULL; - int cylsize = 0, frac = 0, padding = 0; + int cylsize = 0, frac = 0; + size_t orig_gpt_size, free_space, gpt_size; + struct iso_primary_descriptor descriptor; prog = strcpy(alloca(strlen(argv[0]) + 1), argv[0]); i = check_option(argc, argv); @@ -450,10 +855,21 @@ main(int argc, char *argv[]) usage(); return 1; } + + if ((mode & EFI) &&...
2014 Jun 22
0
[PATCH 5/6] utils/isohybrid.c: Change all fseek(3) to fseeko(3)
...ize_t)i) @@ -1086,7 +1086,7 @@ main(int argc, char *argv[]) */ initialise_gpt(buf, 1, (isostat.st_size + padding - 512) / 512, 1); - if (fseek(fp, 512, SEEK_SET)) + if (fseeko(fp, (off_t) 512, SEEK_SET)) err(1, "%s: seek error - 6", argv[0]); if (fwrite(buf, sizeof(char), gpt_size, fp) != (size_t)gpt_size) @@ -1103,7 +1103,7 @@ main(int argc, char *argv[]) initialise_apm(buf, APM_OFFSET); - fseek(fp, APM_OFFSET, SEEK_SET); + fseeko(fp, (off_t) APM_OFFSET, SEEK_SET); fwrite(buf, sizeof(char), apm_size, fp); } @@ -1132,8 +1132,7 @@ main(int argc, char *argv[])...
2014 May 12
4
[PATCH] isohybrid: fix overflow on 32 bit system
...include <unistd.h> +#include <limits.h> #include <sys/stat.h> #include <inttypes.h> #include <uuid/uuid.h> @@ -888,7 +889,7 @@ main(int argc, char *argv[]) FILE *fp = NULL; uint8_t *buf = NULL, *bufz = NULL; int cylsize = 0, frac = 0; - size_t orig_gpt_size, free_space, gpt_size; + size_t orig_gpt_size, free_space, gpt_size, real_offset; struct iso_primary_descriptor descriptor; prog = strcpy(alloca(strlen(argv[0]) + 1), argv[0]); @@ -1125,9 +1126,16 @@ main(int argc, char *argv[]) * Seek far enough back that the gpt header is 512 by...
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,
2012 May 06
1
isohybrid.c, problem reports and questions
Hi, i am currently exploring the boot data of Matthew Garret's Fedora LiveCD. For that i read utils/isohybrid.c from git resp. 4.05. (I assume Matthew used options --efi --mac --type 0 .) Some stumblestones showed up: ----------------------------------------------------------------------- In initialise_gpt() i see unhealthy usage of string constants. Like: memcpy(part->name,
2015 Feb 20
0
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
> > Same result as yours. > > > Have a nice day :) > > Thomas > I was under the impression (apparently the wrong one) that your pseudo-code was adding 4 cylinders to the first example, from 132 to 136, which would be non-optimal. Since I am not a developer, I believe you when you say that such jump won't happen :). Perhaps the code will be more clear to me
2015 Feb 20
2
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
Hi, my proposal is based on a mathematical proof (see mail before) and yours is correct too. They cannot but match. Let's inspect your examples: Ady wrote: > ISO size: 1'085'736'960 bytes ( > 1GiB) This are exactly 132 cylinders of 255x63. 132 is divisible by 4. So there is no padding needed. > Cylinders (1st attempt)=132 > [...] > 2120580 / 4 = 530145, so
2015 Feb 20
4
isohybrid and ISO images whose size is not a multiple of 2048 bytes vs. VirtualBox
...00 +++ isohybrid_test.c 2015-02-20 11:01:33.000000000 +0100 @@ -947,7 +947,7 @@ main(int argc, char *argv[]) int i = 0; FILE *fp = NULL; uint8_t *buf = NULL, *bufz = NULL; - int cylsize = 0, frac = 0; + int cylsize = 0, frac = 0, align_factor, align_cylsize; size_t orig_gpt_size, free_space, gpt_size; struct iso_primary_descriptor descriptor; @@ -1058,9 +1058,20 @@ main(int argc, char *argv[]) isosize = lendian_int(descriptor.size) * lendian_short(descriptor.block_size); free_space = isostat.st_size - isosize; + /* Making sure that the resulting image...
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply