Displaying 9 results from an estimated 9 matches for "parttype_mbr".
2019 Jan 21
0
[PATCH nbdkit v2 1/4] partitioning plugin: Support MBR logical partitions.
...et. */
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 "
- "and a maximum virtual disk size of about 2 TB, "
+ nbdkit_error ("MBR partition table type supports "
+ "a maximum vir...
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.
...*filename; /* file= 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 *...
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.
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.
2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...ons) == 0);
+ assert (nr_regions (&the_regions) == 0);
assert (nr_files > 0);
assert (primary == NULL);
assert (secondary == NULL);
@@ -104,13 +104,13 @@ create_virtual_disk_layout (void)
/* Virtual primary partition table region at the start of the disk. */
if (parttype == PARTTYPE_MBR) {
- if (append_region_len (®ions, "MBR",
+ if (append_region_len (&the_regions, "MBR",
SECTOR_SIZE, 0, 0,
region_data, primary) == -1)
return -1;
}
else /* PARTTYPE_GPT */ {
- if (append_re...
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 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...}
}
else if (strcmp (key, "partition-type") == 0) {
- if (strcasecmp (value, "mbr") == 0 || strcasecmp (value, "dos") == 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 c...
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.