search for: mountable_device

Displaying 20 results from an estimated 49 matches for "mountable_device".

2016 Jul 07
2
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...common_utils.ml > +++ b/mllib/common_utils.ml > @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root = > > let inspect_mount_root_ro = > inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") > + > +let is_btrfs_subvolume g fs = > + let device = g#mountable_device fs in > + let subvol = > + try > + g#mountable_subvolume fs > + with Guestfs.Error msg as exn -> > + if g#last_errno () = Guestfs.Errno.errno_EINVAL then "" > + else raise exn in > + device <> "" && subvol <> &qu...
2016 Mar 01
0
[PATCH 2/3] api: add mountable_device and mountable_subvolume
...tions.ml b/generator/actions.ml index eb45392..454164f 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -1290,6 +1290,31 @@ Please read L<guestfs(3)/INSPECTION> for more details. See also C<guestfs_inspect_get_mountpoints>." }; { defaults with + name = "mountable_device"; added = (1, 33, 13); + style = RString "device", [Mountable "mountable"], []; + shortdesc = "extract the device part of a mountable"; + longdesc = "\ +Returns the device name of a mountable. In quite a lot of +cases, the mountable is the device nam...
2016 Mar 08
0
[PATCH v2 2/3] api: add mountable_device and mountable_subvolume
...tions.ml b/generator/actions.ml index 36d08ad..696fd87 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -1290,6 +1290,32 @@ Please read L<guestfs(3)/INSPECTION> for more details. See also C<guestfs_inspect_get_mountpoints>." }; { defaults with + name = "mountable_device"; added = (1, 33, 14); + style = RString "device", [Mountable "mountable"], []; + shortdesc = "extract the device part of a mountable"; + longdesc = "\ +Returns the device name of a mountable. In quite a lot of +cases, the mountable is the device nam...
2016 Mar 08
0
[PATCH v3 2/3] api: add mountable_device and mountable_subvolume
...tions.ml b/generator/actions.ml index 36d08ad..51f2295 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -1290,6 +1290,32 @@ Please read L<guestfs(3)/INSPECTION> for more details. See also C<guestfs_inspect_get_mountpoints>." }; { defaults with + name = "mountable_device"; added = (1, 33, 15); + style = RString "device", [Mountable "mountable"], []; + shortdesc = "extract the device part of a mountable"; + longdesc = "\ +Returns the device name of a mountable. In quite a lot of +cases, the mountable is the device nam...
2016 Jul 07
0
Re: [PATCH 1/3] mllib: add checking for btrfs subvolume
...mmon_utils.ml > > @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root = > > > > let inspect_mount_root_ro = > > inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") > > + > > +let is_btrfs_subvolume g fs = > > + let device = g#mountable_device fs in > > + let subvol = > > + try > > + g#mountable_subvolume fs > > + with Guestfs.Error msg as exn -> > > + if g#last_errno () = Guestfs.Errno.errno_EINVAL then "" > > + else raise exn in > > + device <> "&q...
2016 Jul 07
7
[PATCH 0/3] fix btrfs subvolume procession in tools
This patcheset fixes errors in virt-sysprep and virt-sparsify. Here we have a common functionality: is_btrfs_subvolume. Doesn't it make sense to turn it into guestfs API? Also I found an issue. In 'virt-sysprep fs-uuids', the uuids for ALL filesystems are regenerated as many times as many roots are in guest. Is it done intentionally? Maxim Perevedentsev (3): mllib: add checking
2016 Mar 08
5
[PATCH v3 0/3] btrfs subvolumes display fix
Hi there, Latest and greatest version including all new remarks from both Pino and Rich. Cédric Bosdonnat (3): configure: handle older version of ncurses api: add mountable_device and mountable_subvolume fish: fix btrfs subvolumes display in error case fish/options.c | 28 ++++++++++++++++++++++++++- generator/actions.ml | 26 +++++++++++++++++++++++++ m4/guestfs_libraries.m4 | 9 ++++++++- po/POTFILES | 1 + src/Makefile.am | 1 + src/...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device. --- generator/bindtests.ml | 2 +- generator/c.ml | 7 +++++-- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 6 +++--- generator/fish.ml | 8 ++++---- generator/gobject.ml | 11 ++++++----- generator/haskell.ml | 11 +++++++---- generator/java.ml | 10 +++++-----
2014 Nov 27
2
[PATCH 1/1] inspect: Fix a bug in the *BSD root detection
...> 0 && guestfs_is_file (g, "/etc/fstab") > 0) { - /* Ignore /dev/sda1 which is a shadow of the real root filesystem - * that is probably /dev/sda5 (see: - * http://www.freebsd.org/doc/handbook/disk-organization.html) - */ - if (m->im_type == MOUNTABLE_DEVICE && - match (g, m->im_device, re_first_partition)) - return 0; - fs->is_root = 1; fs->format = OS_FORMAT_INSTALLED; if (guestfs___check_freebsd_root (g, fs) == -1) @@ -225,14 +250,6 @@ check_filesystem (guestfs_h *g, const char *mountable, gues...
2014 Dec 09
0
[PATCH] inspection: Not an installer if there are multiple partitions (RHBZ#1171666).
...int whole_device) { + int partnum = -1, nr_partitions = -1; /* Not CLEANUP_FREE, as it will be cleaned up with inspection info */ char *windows_systemroot = NULL; if (extend_fses (g) == -1) return -1; - int partnum = -1; - if (!whole_device && m->im_type == MOUNTABLE_DEVICE) { - guestfs_push_error_handler (g, NULL, NULL); - partnum = guestfs_part_to_partnum (g, m->im_device); - guestfs_pop_error_handler (g); + if (!whole_device && m->im_type == MOUNTABLE_DEVICE && + guestfs___is_partition (g, m->im_device)) { + if (get_partit...
2016 Mar 01
6
[PATCH 0/3] btrfs subvolumes display fix
Hey there! Here are a few patches to fix unrelated things: one fixes the configure for older ncurses releases having no pkg-config files. The other two are fixing what Richard mentioned about guestfs subvolumes display Cédric Bosdonnat (3): configure: handle older version of ncurses api: add mountable_device and mountable_subvolume fish: fix btrfs subvolumes display in error case fish/options.c | 15 ++++++++++++++- generator/actions.ml | 25 +++++++++++++++++++++++++ m4/guestfs_libraries.m4 | 6 +++++- po/POTFILES | 1 + src/Makefile.am | 1 + src/mountable.c...
2016 Mar 08
7
[PATCH v2 0/3] btrfs subvolumes display fix
Hi all, Here is version 2 of the patch series, including the changes for Pino's remarks. Cédric Bosdonnat (3): configure: handle older version of ncurses api: add mountable_device and mountable_subvolume fish: fix btrfs subvolumes display in error case fish/options.c | 28 ++++++++++++++++++++++++++- generator/actions.ml | 26 +++++++++++++++++++++++++ m4/guestfs_libraries.m4 | 12 +++++++++++- po/POTFILES | 1 + src/Makefile.am | 1 + s...
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot This is significantly reworked from before. umount is gone as discussed, and variable motion is minimised. [PATCH 2/7] btrfs: Update btrfs_subvolume_list to take Already provisionally ACKed. Previous comment was that cleanup could be tidier. I looked into creating a new cleanup function for fs_buf, but it isn't possible (or simple, anyway) in this
2016 Jul 07
0
[PATCH 1/3] mllib: add checking for btrfs subvolume
...dex 77b9acd..30fc5cd 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -922,3 +922,13 @@ let inspect_mount_root g ?mount_opts_fn root = let inspect_mount_root_ro = inspect_mount_root ~mount_opts_fn:(fun _ -> "ro") + +let is_btrfs_subvolume g fs = + let device = g#mountable_device fs in + let subvol = + try + g#mountable_subvolume fs + with Guestfs.Error msg as exn -> + if g#last_errno () = Guestfs.Errno.errno_EINVAL then "" + else raise exn in + device <> "" && subvol <> "" diff --git a/mllib/common...
2016 Jul 08
0
[PATCHv2 2/3] lvm: modify guestfs_is_lv to take mountable
...lvm.c +++ b/daemon/lvm.c @@ -863,9 +863,11 @@ lv_canonical (const char *device, char **ret) /* Test if a device is a logical volume (RHBZ#619793). */ int -do_is_lv (const char *device) +do_is_lv (const mountable_t *mountable) { - return lv_canonical (device, NULL); + if (mountable->type != MOUNTABLE_DEVICE) + return 0; + return lv_canonical (mountable->device, NULL); } /* Return canonical name of LV to caller (RHBZ#638899). */ diff --git a/generator/actions.ml b/generator/actions.ml index e0931b8..2a69db8 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -9068,7 +9068,7 @@ I&l...
2014 Nov 27
0
[PATCH 0/1] inspect: Fix a bug in the *BSD root detection
...detection that is missing. Both, in FreeBSD and in NetBSD you have this piece of code: /* Ignore /dev/sda1 which is a shadow of the real root filesystem * that is probably /dev/sda5 (see: * http://www.freebsd.org/doc/handbook/disk-organization.html) */ if (m->im_type == MOUNTABLE_DEVICE && match (g, m->im_device, re_first_partition)) return 0; This assumption is not always true. First of all, the MBR partition that hosts the disklabel could be any of the primary partitions. Not just the first one. The OpenBSD installer for example will by default use the...
2015 Jul 08
0
[PATCH 2/5] labels: move e2label to ext2.c and call it locally
...eturn -1; + } + + r = command (NULL, &err, str_e2label, device, label, NULL); + if (r == -1) { + reply_with_error ("%s", err); + return -1; + } + + return 0; +} + +int do_set_e2label (const char *device, const char *label) { - const mountable_t mountable = { - .type = MOUNTABLE_DEVICE, - .device = /* not really ... */ (char *) device, - .volume = NULL, - }; - return do_set_label (&mountable, label); + return ext_set_label (device, label); } char * diff --git a/daemon/labels.c b/daemon/labels.c index eec5b96..1fadba4 100644 --- a/daemon/labels.c +++ b/daemon/labe...
2015 Jul 08
9
[PATCH 0/5] labels: rework
We should use the existing function from specific fs, if not, move it to specific fs files. Chen Hanxiao (5): label: move btrfslabel to btrfs.c label: move e2label to ext2.c and call it locally label: move ntfslabel to ntfs.c label: use existing do_xfs_admin for xfslabel labels: return ENOTSUP if could not set label for specific fs daemon/btrfs.c | 16 +++++++++++ daemon/daemon.h |
2016 Jul 08
4
[PATCHv2 0/3] fix btrfs subvolume procession in tools
sparsify case: modified guestfs_is_lv mllib: fixed is_btrfs_subvolume Maxim Perevedentsev (3): mllib: add checking for btrfs subvolume lvm: modify guestfs_is_lv to take mountable sysprep: fix btrfs subvolume processing in fs-uuids daemon/lvm.c | 6 ++++-- generator/actions.ml | 6 +++--- mllib/common_utils.ml | 7 +++++++