search for: create_virtual_disk_layout

Displaying 11 results from an estimated 11 matches for "create_virtual_disk_layout".

2020 Apr 15
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...find_region (&the_regions, offset); size_t i, len; ssize_t r; diff --git a/plugins/partitioning/virtual-disk.c b/plugins/partitioning/virtual-disk.c index bb97d007..5a16fb04 100644 --- a/plugins/partitioning/virtual-disk.c +++ b/plugins/partitioning/virtual-disk.c @@ -55,7 +55,7 @@ create_virtual_disk_layout (void) { size_t i; - assert (nr_regions (&regions) == 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 tab...
2019 Jan 21
0
[PATCH nbdkit v2 1/4] partitioning plugin: Support MBR logical partitions.
.../virtual-disk.h @@ -104,7 +104,7 @@ extern struct file *files; extern size_t nr_files; extern struct regions regions; -extern unsigned char *primary, *secondary; +extern unsigned char *primary, *secondary, **ebr; /* Main entry point called after files array has been populated. */ extern int create_virtual_disk_layout (void); @@ -115,16 +115,16 @@ extern int create_virtual_disk_layout (void); extern int parse_guid (const char *str, char *out) __attribute__((__nonnull__ (1, 2))); -/* Internal functions for creating MBR and GPT layouts. These are - * published here because the GPT code calls into the MBR co...
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.
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.
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 Feb 25
6
[PATCH nbdkit 0/5] server: Add .get_ready callback.
I like this change. I think we were overloading the config_complete method before to do two different things (complete configuration; do any allocation/housekeeping necessary before we can start serving). The only questions in my mind are whether we want this before 1.18, and whether the name ("get_ready") is a good one. Rich.
2018 Sep 17
0
[PATCH nbdkit v3 3/3] Add partitioning plugin.
...%m"); + return -1; + } + *objects = p; + (*nr_objects)++; + return 0; +} + +/* Called once we have the list of filenames and have selected a + * partition type. This creates the virtual disk layout as a list of + * regions. + */ +static int create_partition_table (void); + +static int +create_virtual_disk_layout (void) +{ + struct region region; + size_t i; + + assert (nr_regions == 0); + assert (nr_files > 0); + assert (primary == NULL); + assert (secondary == NULL); + + /* Allocate the virtual partition table. */ + if (parttype == PARTTYPE_MBR) { + primary = calloc (1, SECTOR_SIZE); + if...
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
...ttribute__((__nonnull__ (1))); #endif /* NBDKIT_EFI_CRC32_H */ diff --git a/plugins/partitioning/virtual-disk.h b/plugins/partitioning/virtual-disk.h index da846f5..3860f46 100644 --- a/plugins/partitioning/virtual-disk.h +++ b/plugins/partitioning/virtual-disk.h @@ -111,14 +111,19 @@ extern int create_virtual_disk_layout (void); /* Parse a GPT GUID. Note that GPT GUIDs have peculiar * characteristics which make them unlike general GUIDs. */ -extern int parse_guid (const char *str, char *out); +extern int parse_guid (const char *str, char *out) + __attribute__((__nonnull__ (1, 2))); /* Internal functions f...
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.
2019 Jan 02
4
[PATCH nbdkit v2 0/2] Use of attribute(()).
v1 was here: https://www.redhat.com/archives/libguestfs/2019-January/msg00008.html In v2 I have provided two patches: The first patch extends attribute((nonnull)) to most internal functions, but not to the external API. The second patch uses a macro so that attribute((format)) is only used in the public API on GCC or Clang. At least in theory these headers could be used by a C compiler which