search for: guestfs_mountable_subvolum

Displaying 14 results from an estimated 14 matches for "guestfs_mountable_subvolum".

2016 Mar 01
2
Re: [PATCH 3/3] fish: fix btrfs subvolumes display in error case
..._program_name); > > for (i = 0; fses[i] != NULL; i += 2) { > - CLEANUP_FREE char *p = guestfs_canonical_device_name (g, fses[i]); > + CLEANUP_FREE char *p = NULL; > + CLEANUP_FREE char *device = guestfs_mountable_device(g, fses[i]); > + CLEANUP_FREE char *volume = guestfs_mountable_subvolume(g, fses[i]); If guestfs_mountable_subvolume fails, then an error is issued to the error handler set: you need to push a temporary null error handler to avoid that: CLEANUP_FREE char *subvolume = NULL; int subvolume_errno; ... guestfs_push_error_handler (g, NULL, NULL); subvolume = gues...
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
2016 Jun 08
1
[PATCH] filesystems: don't try to get the size of btrfs subvolume
...columns & COLUMN_SIZE)) { - size = guestfs_blockdev_getsize64 (g, fses[i]); - if (size == -1) + CLEANUP_FREE char *device = guestfs_mountable_device (g, fses[i]); + CLEANUP_FREE char *subvolume = NULL; + + guestfs_push_error_handler (g, NULL, NULL); + + subvolume = guestfs_mountable_subvolume (g, fses[i]); + if (subvolume == NULL && guestfs_last_errno (g) != EINVAL) { + fprintf (stderr, + _("%s: cannot determine the subvolume for %s: %s (%d)\n"), + guestfs_int_program_name, fses[i], + guestfs_last_error (g), gu...
2016 Jun 15
1
[PATCH v2] filesystems: don't try to get the size of btrfs subvolume
...columns & COLUMN_SIZE)) { - size = guestfs_blockdev_getsize64 (g, fses[i]); - if (size == -1) + CLEANUP_FREE char *device = guestfs_mountable_device (g, fses[i]); + CLEANUP_FREE char *subvolume = NULL; + + guestfs_push_error_handler (g, NULL, NULL); + + subvolume = guestfs_mountable_subvolume (g, fses[i]); + if (subvolume == NULL && guestfs_last_errno (g) != EINVAL) { + fprintf (stderr, + _("%s: cannot determine the subvolume for %s: %s: %s\n"), + guestfs_int_program_name, fses[i], + guestfs_last_error (g), +...
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 +++++++++++++++++++++++++
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
2016 Mar 01
0
[PATCH 3/3] fish: fix btrfs subvolumes display in error case
...evice, guestfs_int_program_name); for (i = 0; fses[i] != NULL; i += 2) { - CLEANUP_FREE char *p = guestfs_canonical_device_name (g, fses[i]); + CLEANUP_FREE char *p = NULL; + CLEANUP_FREE char *device = guestfs_mountable_device(g, fses[i]); + CLEANUP_FREE char *volume = guestfs_mountable_subvolume(g, fses[i]); + + /* Reformat the internal btrfsvol string into a valid mount option */ + if (device && volume && guestfs_last_errno (g) != EINVAL) { + if (asprintf (&p, "%s:/:subvol=%s", device, volume) == -1) { + perror ("asprintf"); +...
2016 Mar 08
0
[PATCH v2 3/3] fish: fix btrfs subvolumes display in error case
...EE char *p = guestfs_canonical_device_name (g, fses[i]); + CLEANUP_FREE char *p = NULL; + CLEANUP_FREE char *device = guestfs_mountable_device(g, fses[i]); + CLEANUP_FREE char *subvolume = NULL; + int subvolume_errno; + + guestfs_push_error_handler (g, NULL, NULL); + + subvolume = guestfs_mountable_subvolume(g, fses[i]); + if (subvolume == NULL && guestfs_last_errno (g) != EINVAL) { + fprintf (stderr, + _("%s: cannot determine the subvolume for %s: %s (%d)\n"), + guestfs_int_program_name, fses[i], + guestfs_last_error (g), guestfs_last_...
2016 Jul 07
0
Re: list-filesystems and btrfs snapshots
On Thu, 2016-07-07 at 16:45 +0300, Maxim Perevedentsev wrote: > Do I understand right that the right way of skipping btrfs subvolumes is > guestfs_mountable_device(fs) != NULL && guestfs_mountable_subvolume(fs) > != NULL. Yes, that's the way to go. -- Cedric
2016 Mar 01
0
[PATCH 2/3] api: add mountable_device and mountable_subvolume
...a mountable"; + longdesc = "\ +Returns the device name of a mountable. In quite a lot of +cases, the mountable is the device name. However this doesn't +apply for btrfs subvolumes, where the mountable is a combination +of both the device name and the subvolume path (see also +C<guestfs_mountable_subvolume> to extract the subvolume path +of the mountable if any)." }; + + { defaults with + name = "mountable_subvolume"; added = (1, 33, 13); + style = RString "subvolume", [Mountable "mountable"], []; + shortdesc = "extract the subvolume part of a mou...
2016 Mar 08
0
[PATCH v2 2/3] api: add mountable_device and mountable_subvolume
...mountable"; + longdesc = "\ +Returns the device name of a mountable. In quite a lot of +cases, the mountable is the device name. + +However this doesn't apply for btrfs subvolumes, where the +mountable is a combination of both the device name and the +subvolume path (see also C<guestfs_mountable_subvolume> to +extract the subvolume path of the mountable if any)." }; + + { defaults with + name = "mountable_subvolume"; added = (1, 33, 14); + style = RString "subvolume", [Mountable "mountable"], []; + shortdesc = "extract the subvolume part of a mou...
2016 Mar 08
0
[PATCH v3 2/3] api: add mountable_device and mountable_subvolume
...mountable"; + longdesc = "\ +Returns the device name of a mountable. In quite a lot of +cases, the mountable is the device name. + +However this doesn't apply for btrfs subvolumes, where the +mountable is a combination of both the device name and the +subvolume path (see also C<guestfs_mountable_subvolume> to +extract the subvolume path of the mountable if any)." }; + + { defaults with + name = "mountable_subvolume"; added = (1, 33, 15); + style = RString "subvolume", [Mountable "mountable"], []; + shortdesc = "extract the subvolume part of a mou...
2016 Feb 26
1
Displaying mountables in the error output of guestfish etc
Cédric pointed out this problem we have: $ guestmount -a /var/lib/libvirt/images/sles12sp1-pv.img -m '/dev/sda1:/:subvol=.snapshots/2/snapshot:btrfs' /mnt libguestfs: error: mount_vfs: /dev/sda1 on / (options: 'subvol=.snapshots/2/snapshot'): mount: mount(2) failed: No such file or directory guestmount: '/dev/sda1' could not be mounted. guestmount: Check mount(8) man page
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files. Rich.