search for: guestfs_part_to_dev

Displaying 20 results from an estimated 32 matches for "guestfs_part_to_dev".

2014 Dec 09
0
[PATCH] inspection: Not an installer if there are multiple partitions (RHBZ#1171666).
...th_expression (guestfs_h *g, const char **configfiles) debug (g, "augeas pathexpr = %s", ret); return ret; } - -static int -is_partition (guestfs_h *g, const char *partition) -{ - CLEANUP_FREE char *device = NULL; - - guestfs_push_error_handler (g, NULL, NULL); - - if ((device = guestfs_part_to_dev (g, partition)) == NULL) { - guestfs_pop_error_handler (g); - return 0; - } - - if (guestfs_device_index (g, device) == -1) { - guestfs_pop_error_handler (g); - return 0; - } - - guestfs_pop_error_handler (g); - - return 1; -} diff --git a/src/inspect-fs.c b/src/inspect-fs.c index...
2020 Feb 20
1
[PATCH] lib: Move guestfs_device_index impl from daemon to library.
Although the commit message ties this to https://bugzilla.redhat.com/1804207, in fact I believe this commit could be applied independently. It's a simple optimization. Rich.
2016 Feb 05
3
[PATCH] inspect: get windows drive letters for GPT disks.
...har *fs_guid = NULL; + CLEANUP_FREE char *blob_guid = NULL; + CLEANUP_FREE char *fs_dev = NULL; + + fs_dev = guestfs_canonical_device_name (g, fses[i]); + + if (fs_dev == NULL) + continue; + + int partnum = guestfs_part_to_partnum (g, fs_dev); + CLEANUP_FREE char *device = guestfs_part_to_dev (g, fs_dev); + CLEANUP_FREE char *type = guestfs_part_get_parttype (g, device); + + if (STRCASENEQ(type, "gpt")) + continue; + + /* get the GPT parition GUID from the partition block device */ + fs_guid = guestfs_part_get_gpt_guid (g, device, partnum); + + if (fs...
2013 Jan 24
2
[PATCH 1/2] lib: Add CLEANUP_FREE macro which automatically calls 'free' when leaving scope.
From: "Richard W.M. Jones" <rjones@redhat.com> Use the macro like this to create temporary variables which are automatically cleaned up when the scope is exited: { CLEANUP_FREE (char *, foo, strdup (bar)); /* char *foo = strdup (bar) */ ... // no need to call free (foo)! } On GCC and LLVM, this is implemented using __attribute__((cleanup(...))). On other
2016 Feb 05
2
[PATCHv2] inspect: get windows drive letters for GPT disks.
...= 2) { + CLEANUP_FREE char *fs_guid = NULL; + CLEANUP_FREE char *blob_guid = NULL; + int partnum; + CLEANUP_FREE char *device = NULL; + CLEANUP_FREE char *type = NULL; + + partnum = guestfs_part_to_partnum (g, parts[i]); + + if (partnum == -1) + continue; + + device = guestfs_part_to_dev (g, parts[i]); + + if (device == NULL) + continue; + + type = guestfs_part_get_parttype (g, device); + + if (type == NULL) + continue; + + if (STRCASENEQ (type, "gpt")) + continue; + + /* get the GPT parition GUID from the partition block device */ +...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2015 Jun 23
2
[PATCH] lib: Add optional 'append' parameter to copy-(device|file)-to-file APIs.
...dest, wrflags, 0666, COPY_UNLINK_DEST_ON_FAILURE, srcoffset, destoffset, size, sparse); } diff --git a/generator/actions.ml b/generator/actions.ml index d5e5ccf..11b8652 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -9424,7 +9424,7 @@ See also C<guestfs_part_to_dev>." }; { defaults with name = "copy_device_to_device"; added = (1, 13, 25); - style = RErr, [Device "src"; Device "dest"], [OInt64 "srcoffset"; OInt64 "destoffset"; OInt64 "size"; OBool "sparse"]; + style =...
2016 Feb 05
0
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...= NULL; > + > + fs_dev = guestfs_canonical_device_name (g, fses[i]); > + > + if (fs_dev == NULL) > + continue; > + > + int partnum = guestfs_part_to_partnum (g, fs_dev); Need to check that partnum != -1 and do something. > + CLEANUP_FREE char *device = guestfs_part_to_dev (g, fs_dev); > + CLEANUP_FREE char *type = guestfs_part_get_parttype (g, device); > + > + if (STRCASENEQ(type, "gpt")) > + continue; > + > + /* get the GPT parition GUID from the partition block device */ > + fs_guid = guestfs_part_get_gpt_guid (g,...
2016 Feb 06
1
[PATCH v3] inspect: get windows drive letters for GPT disks.
...turn NULL; + + for (i = 0; parts[i] != NULL; ++i) { + CLEANUP_FREE char *fs_guid = NULL; + int partnum; + CLEANUP_FREE char *device = NULL; + CLEANUP_FREE char *type = NULL; + + partnum = guestfs_part_to_partnum (g, parts[i]); + if (partnum == -1) + continue; + + device = guestfs_part_to_dev (g, parts[i]); + if (device == NULL) + continue; + + type = guestfs_part_get_parttype (g, device); + if (type == NULL) + continue; + + if (STRCASENEQ (type, "gpt")) + continue; + + /* get the GPT parition GUID from the partition block device */ + fs_guid =...
2015 Jun 23
0
Re: [PATCH] lib: Add optional 'append' parameter to copy-(device|file)-to-file APIs.
...COPY_UNLINK_DEST_ON_FAILURE, > srcoffset, destoffset, size, sparse); > } > diff --git a/generator/actions.ml b/generator/actions.ml > index d5e5ccf..11b8652 100644 > --- a/generator/actions.ml > +++ b/generator/actions.ml > @@ -9424,7 +9424,7 @@ See also C<guestfs_part_to_dev>." }; > > { defaults with > name = "copy_device_to_device"; added = (1, 13, 25); > - style = RErr, [Device "src"; Device "dest"], [OInt64 "srcoffset"; OInt64 "destoffset"; OInt64 "size"; OBool "sparse&...
2016 Feb 05
1
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...anonical_device_name (g, fses[i]); > > + > > +    if (fs_dev == NULL) > > +        continue; > > + > > +    int partnum = guestfs_part_to_partnum (g, fs_dev); > > Need to check that partnum != -1 and do something. > > > +    CLEANUP_FREE char *device = guestfs_part_to_dev (g, fs_dev); > > +    CLEANUP_FREE char *type = guestfs_part_get_parttype (g, > > device); > > + > > +    if (STRCASENEQ(type, "gpt")) > > +        continue; > > + > > +    /* get the GPT parition GUID from the partition block device > > */...
2017 Jul 14
0
[PATCH 19/27] daemon: Reimplement ‘list_filesystems’ API in the daemon, in OCaml.
...ices = guestfs_list_devices (g); - if (devices == NULL) goto error; - partitions = guestfs_list_partitions (g); - if (partitions == NULL) goto error; - mds = guestfs_list_md_devices (g); - if (mds == NULL) goto error; - - for (i = 0; partitions[i] != NULL; ++i) { - CLEANUP_FREE char *dev = guestfs_part_to_dev (g, partitions[i]); - if (dev) - remove_from_list (devices, dev); - } - - /* Use vfs-type to check for filesystems on devices. */ - for (i = 0; devices[i] != NULL; ++i) - if (check_with_vfs_type (g, devices[i], &ret) == -1) - goto error; - - /* Use vfs-type to check for file...
2013 Feb 07
2
[PATCH 1/2] Fix bogus partition number passed to guestfs___check_for_filesystem_on
Partition number was being passed to guestfs___check_for_filesystem_on based on an index in list_partition. However, this ignores the possibility of multiple block devices. This change makes guestfs___check_for_filesystem_on examine the passed-in device directly to determine if it is a whole device, or what its partition number is. --- src/guestfs-internal.h | 2 +- src/inspect-fs.c | 45
2017 Feb 28
0
ANNOUNCE: libguestfs 1.36 released
...S_HIVEX_OPEN_UNSAFE" flag which allows certain corrupted Windows Registry hives to be opened. This feature requires hivex ≥ 1.3.14 (Dawid Zamirski). "guestfs_list_partitions" This call now returns Linux software RAID partitions. "guestfs_part_to_dev" This call now correctly handles partition names which include "p<N>" (Pino Toscano). "guestfs_set_label" This call can now change the labels of swap partitions (Pino Toscano). Build changes libmagic, the...
2011 Nov 11
3
[PATCH v2] Add mdadm-create, list-md-devices APIs.
This adds the mdadm-create API for creating RAID devices, and includes various fixes for the other two patches. Rich.
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection series here: https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html What I've done is to extract just the parts related to rewriting daemon APIs in OCaml, rebase them on top of the current master, fix a few things, and recompile and test everything. Rich.