search for: do_output_filesystem

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

Did you mean: do_output_filesystems
2016 Jun 08
1
[PATCH] filesystems: don't try to get the size of btrfs subvolume
...s in an error. Teach it to skip the subvolumes. --- cat/filesystems.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/cat/filesystems.c b/cat/filesystems.c index f1c2852..f679517 100644 --- a/cat/filesystems.c +++ b/cat/filesystems.c @@ -476,9 +476,27 @@ do_output_filesystems (void) } } if ((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,...
2016 Jun 15
1
[PATCH v2] filesystems: don't try to get the size of btrfs subvolume
...in an error. Teach it to skip the subvolumes. --- cat/filesystems.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/cat/filesystems.c b/cat/filesystems.c index f1c2852..cfdac86 100644 --- a/cat/filesystems.c +++ b/cat/filesystems.c @@ -476,9 +476,28 @@ do_output_filesystems (void) } } if ((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,...
2020 Feb 26
1
[PATCH] filesystems: fix size reporting for filesystems
...ajority of the cases. Thanks to: Erik Skultety. --- cat/filesystems.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/cat/filesystems.c b/cat/filesystems.c index cec3c4e47..2b95d3112 100644 --- a/cat/filesystems.c +++ b/cat/filesystems.c @@ -508,7 +508,23 @@ do_output_filesystems (void) guestfs_pop_error_handler (g); if (!device || !subvolume) { - size = guestfs_blockdev_getsize64 (g, fses[i]); + /* Try mounting and stating the device. This might reasonably + * fail, so don't show errors. + */ + guestfs_push_error_h...
2016 Sep 08
4
[PATCH 0/3] Use gnulib's getprogname
Hi, this series update libguestfs to a recent gnulib version, so that we can use its new getprogname module, and solve altogether one of the porting issues (the need for 'program_name' by the error module of gnulib), and have a single way to get the name of the current program. A number of changes in tools mostly, although mechanical. Thanks, Pino Toscano (3): Update gnulib to latest
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...x 3013115..6f083d3 100644 --- a/cat/filesystems.c +++ b/cat/filesystems.c @@ -25,6 +25,7 @@ #include <unistd.h> #include <getopt.h> #include <errno.h> +#include <error.h> #include <locale.h> #include <assert.h> #include <string.h> @@ -458,10 +459,8 @@ do_output_filesystems (void) guestfs_pop_error_handler (g); if (vfs_label == NULL) { vfs_label = strdup (""); - if (!vfs_label) { - perror ("strdup"); - exit (EXIT_FAILURE); - } + if (!vfs_label) + error (EXIT_FAILURE, errno, &qu...