search for: find_file_region

Displaying 5 results from an estimated 5 matches for "find_file_region".

2019 Jan 21
0
[PATCH nbdkit v2 1/4] partitioning plugin: Support MBR logical partitions.
...artitioning/partition-mbr.c index 0e72cf0..9f4efc8 100644 --- a/plugins/partitioning/partition-mbr.c +++ b/plugins/partitioning/partition-mbr.c @@ -50,27 +50,125 @@ #include "regions.h" #include "virtual-disk.h" -/* Create the partition table. */ +static const struct region *find_file_region (size_t i, size_t *j); +static const struct region *find_ebr_region (size_t i, size_t *j); + +/* Create the MBR and optionally EBRs. */ void -create_mbr_partition_table (unsigned char *out) +create_mbr_layout (void) { - size_t i, j; - - for (j = 0; j < nr_regions (&regions); ++j) { -...
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.
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
0
[PATCH nbdkit 4/9] common/regions: Use new vector type to store the list of regions.
...region.end = virtual_size (&regions) - 1; /* to end of disk */ + region.end = virtual_size (&the_regions) - 1; /* to end of disk */ region.len = region.end - region.start + 1; create_mbr_partition_table_entry (&region, false, 0xf, &primary[0x1ee]); @@ -144,8 +144,8 @@ find_file_region (size_t i, size_t *j) { const struct region *region; - for (; *j < nr_regions (&regions); ++(*j)) { - region = get_region (&regions, *j); + for (; *j < nr_regions (&the_regions); ++(*j)) { + region = &the_regions.ptr[*j]; if (region->type == region_file &...
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.