search for: append_region

Displaying 8 results from an estimated 8 matches for "append_region".

Did you mean: append_begin
2018 Oct 28
0
[PATCH nbdkit 4/4] Add floppy plugin.
..._floppy *floppy) +{ + struct region region; + size_t i; + + /* MBR. */ + region.start = 0; + region.end = SECTOR_SIZE-1; + region.len = region.end - region.start + 1; + region.type = region_data; + region.u.data = (void *) &floppy->mbr; + region.description = "MBR"; + if (append_region (&floppy->regions, region) == -1) + return -1; + + /* Free space before first partition. */ + region.start = SECTOR_SIZE; + region.end = 2048*SECTOR_SIZE-1; + region.len = region.end - region.start + 1; + region.type = region_zero; + region.description = "first partition alignm...
2018 Oct 28
6
[PATCH nbdkit 0/4] Add floppy plugin.
Add nbdkit-floppy-plugin, “inspired” by qemu's VVFAT driver, but without the ability to handle writes. The implementation is pretty complete, supporting FAT32, LFNs, volume labels, timestamps, etc, and it passes both ‘make check’ and ‘make check-valgrind’. Usage is simple; to serve the current directory: $ nbdkit floppy . Then using guestfish (or any NBD client): $ guestfish --ro
2019 Jan 01
3
[PATCH nbdkit] include: Annotate function parameters with attribute((nonnull)).
Should we use attribute((nonnull)) at all? There's a very interesting history of this in libvirt -- try looking at commit eefb881 plus the commits referencing eefb881 -- but it does seem to work for me using recent GCC and Clang. I only did a few functions because annotating them gets old quickly... Rich.
2019 Jan 02
0
[PATCH nbdkit v2 1/2] Annotate internal function parameters with attribute((nonnull)).
.../common/regions/regions.h @@ -76,25 +76,30 @@ struct regions { size_t nr_regions; }; -extern void init_regions (struct regions *regions); -extern void free_regions (struct regions *regions); -extern const struct region *find_region (const struct regions *regions, uint64_t offset); -extern int append_region (struct regions *regions, struct region region); +extern void init_regions (struct regions *regions) + __attribute__((__nonnull__ (1))); +extern void free_regions (struct regions *regions) + __attribute__((__nonnull__ (1))); +extern const struct region *find_region (const struct regions *regions,...
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
2019 Jan 21
0
[PATCH nbdkit v2 1/4] partitioning plugin: Support MBR logical partitions.
...ARTTYPE_MBR && nr_files > 4 && i >= 3) { + region.start = offset; + region.len = SECTOR_SIZE; + region.end = region.start + region.len - 1; + region.type = region_data; + region.u.data = ebr[i-3]; + region.description = "EBR"; + if (append_region (&regions, region) == -1) + return -1; + + offset = virtual_size (&regions); + } + /* Make sure each partition is aligned for best performance. */ if (!IS_ALIGNED (offset, files[i].alignment)) { region.start = offset; @@ -207,13 +240,10 @@ create_partition_ta...
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