search for: parttype_gpt

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

2019 Jan 21
0
[PATCH nbdkit v2 1/4] partitioning plugin: Support MBR logical partitions.
..._size > MAX_MBR_DISK_SIZE) - needs_gpt = true; - else - needs_gpt = false; + needs_gpt = total_size > MAX_MBR_DISK_SIZE; /* Choose default parttype if not set. */ if (parttype == PARTTYPE_UNSET) { - if (needs_gpt) { + if (needs_gpt || nr_files > 4) { parttype = PARTTYPE_GPT; nbdkit_debug ("picking partition type GPT"); } @@ -257,8 +259,8 @@ partitioning_config_complete (void) } } else if (parttype == PARTTYPE_MBR && needs_gpt) { - nbdkit_error ("MBR partition table type supports a maximum of 4 partitions " -...
2019 Jan 20
1
[PATCH nbdkit] partitioning: Support MBR logical partitions.
An evolution of the patch I posted yesterday to qemu-devel (https://www.mail-archive.com/qemu-devel@nongnu.org/msg588920.html) which (a) works and (b) has a test. Rich.
2018 Sep 17
0
[PATCH nbdkit v3 3/3] Add partitioning plugin.
...e= supplied on the command line */ + int fd; + struct stat statbuf; + char guid[16]; /* random GUID used for GPT */ +}; + +static struct file *files = NULL; +static size_t nr_files = 0; + +/* partition-type parameter. */ +#define PARTTYPE_UNSET 0 +#define PARTTYPE_MBR 1 +#define PARTTYPE_GPT 2 +static int parttype = PARTTYPE_UNSET; + +/* Virtual disk regions (contiguous). */ +enum region_type { + region_file, /* contents of the i'th file */ + region_data, /* pointer to data (used for partition table) */ + region_zero, /* padding */ +}; + +struct region { +...
2018 Sep 17
4
[PATCH nbdkit 0/3] Add partitioning plugin.
nbdkit partitioning boot.img swap.img root.img ... creates a virtual disk by adding a partition table. In ancient times Xen used to do this. Rich.
2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
.... */ if (parttype == PARTTYPE_MBR) { - if (append_region_len (&regions, "MBR", + if (append_region_len (&the_regions, "MBR", SECTOR_SIZE, 0, 0, region_data, primary) == -1) return -1; } else /* PARTTYPE_GPT */ { - if (append_region_len (&regions, "GPT primary", + if (append_region_len (&the_regions, "GPT primary", (2+GPT_PTA_LBAs) * SECTOR_SIZE, 0, 0, region_data, primary) == -1) return -1; @@ -120,7 +120,...
2018 Sep 17
7
[PATCH nbdkit v3 0/3] Add partitioning plugin.
The partitioning plugin patch is the same (except for rebasing). However I have changed the first two patches based on feedback received. In particular this fixes a very serious bug found by Eric Blake in the current truncate filter. Rich.
2019 Jan 21
8
[PATCH nbdkit v2 0/4] Support MBR logical partitions.
This is a revised version of the two series previously posted here: https://www.redhat.com/archives/libguestfs/2019-January/msg00137.html https://www.redhat.com/archives/libguestfs/2019-January/msg00139.html There have been many smaller changes but the highlights are: - Using SECTOR_SIZE instead of hard-coding 512 everywhere. - Additional safety checks that the EBR chain doesn't jump
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...os") == 0) + if (ascii_strcasecmp (value, "mbr") == 0 || + ascii_strcasecmp (value, "dos") == 0) parttype = PARTTYPE_MBR; - else if (strcasecmp (value, "gpt") == 0) + else if (ascii_strcasecmp (value, "gpt") == 0) parttype = PARTTYPE_GPT; else { nbdkit_error ("unknown partition-type: %s", value); @@ -205,13 +207,13 @@ partitioning_config (const char *key, const char *value) alignment = r; } else if (strcmp (key, "mbr-id") == 0) { - if (strcasecmp (value, "default") == 0) +...