Displaying 20 results from an estimated 146 matches for "fses".
Did you mean:
fjes
2016 Jun 08
1
[PATCH] filesystems: don't try to get the size of btrfs subvolume
...+), 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, NULL, NULL);
+
+ subvolume = guestfs_mountable_subvolume (g, fses[i]);
+ if (subvolume == NULL &&am...
2016 Jun 15
1
[PATCH v2] filesystems: don't try to get the size of btrfs subvolume
...+), 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, NULL, NULL);
+
+ subvolume = guestfs_mountable_subvolume (g, fses[i]);
+ if (subvolume == NULL &&am...
2016 Mar 01
2
Re: [PATCH 3/3] fish: fix btrfs subvolumes display in error case
...n(-)
>
> diff --git a/fish/options.c b/fish/options.c
> index da5015d..5c09bfb 100644
> --- a/fish/options.c
> +++ b/fish/options.c
> @@ -280,7 +280,20 @@ display_mountpoints_on_failure (const char *mp_device,
> 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]);
If gu...
2016 Mar 08
0
[PATCH v2 3/3] fish: fix btrfs subvolumes display in error case
...1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/fish/options.c b/fish/options.c
index da5015d..9222b69 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -280,7 +280,33 @@ display_mountpoints_on_failure (const char *mp_device,
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 *subvolume = NULL;
+ int subvolume_errno;
+
+ guestfs_push_error_handle...
2020 Feb 20
0
buffer overflow detected in collectd using libguestfs
...is
invoked is given below. I need to mention that the code presented here
lacks proper cleanup.
/* guestfs_extend start */
/* get FS stats using libguestfs */
/* Filesystems. */
guestfs_h *g = NULL;
int ret = 0;
int j = 0;
int cnt_drives = 0;
char **fses = NULL;
struct guestfs_statvfs *fs_stats = NULL;
struct fs_info *fs = NULL;
/* Work around collectd bug with waitpid() after fork() */
signal (SIGCHLD, SIG_DFL);
g = guestfs_create();
if (g == NULL) {
ERROR(PLUGIN_NAME " plugin: failed to create l...
2016 Mar 01
0
[PATCH 3/3] fish: fix btrfs subvolumes display in error case
...1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/fish/options.c b/fish/options.c
index da5015d..5c09bfb 100644
--- a/fish/options.c
+++ b/fish/options.c
@@ -280,7 +280,20 @@ display_mountpoints_on_failure (const char *mp_device,
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 int...
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 +++++++++++++++++++++++++
2013 Feb 07
2
[PATCH 1/2] Fix bogus partition number passed to guestfs___check_for_filesystem_on
...-79,47 +79,47 @@ free_regexps (void)
pcre_free (re_major_minor);
}
-static int check_filesystem (guestfs_h *g, const char *device, int is_block, int is_partnum);
+static int check_filesystem (guestfs_h *g, const char *device,
+ int whole_device);
static int extend_fses (guestfs_h *g);
/* Find out if 'device' contains a filesystem. If it does, add
* another entry in g->fses.
*/
int
-guestfs___check_for_filesystem_on (guestfs_h *g, const char *device,
- int is_block, int is_partnum)
+guestfs___check_for_filesyst...
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 Feb 05
3
[PATCH] inspect: get windows drive letters for GPT disks.
...YTEM\MountedDevices\DosDevices blob to
+ * to libguestfs GPT partition device. For GPT disks, the blob is made of
+ * "DMIO:ID:" prefix followed by the GPT parition GUID.
+ */
+static char *
+map_registry_disk_blob_gpt (guestfs_h *g, const void *blob)
+{
+ CLEANUP_FREE_STRING_LIST char **fses = NULL;
+ size_t i;
+
+ fses = guestfs_list_filesystems (g);
+ if (fses == NULL)
+ return NULL;
+
+ for (i = 0; fses[i] != NULL; i += 2) {
+ CLEANUP_FREE char *fs_guid = NULL;
+ CLEANUP_FREE char *blob_guid = NULL;
+ CLEANUP_FREE char *fs_dev = NULL;
+
+ fs_dev = guestfs_canonic...
2009 Aug 13
1
[PATCH] Don't assume grub is on a separate boot filesystem
...erl/lib/Sys/Guestfs/Lib.pm
+++ b/perl/lib/Sys/Guestfs/Lib.pm
@@ -1435,6 +1435,56 @@ sub _check_for_applications
$os->{apps} = \@apps;
}
+# Find the path which needs to be prepended to paths in grub.conf to make them
+# absolute
+sub _find_grub_prefix
+{
+ my ($g, $os) = @_;
+
+ my $fses = $os->{filesystems};
+ die("filesystems undefined") unless(defined($fses));
+
+ # Look for the filesystem which contains grub
+ my $grubdev;
+ foreach my $dev (keys(%$fses)) {
+ my $fsinfo = $fses->{$dev};
+ if(exists($fsinfo->{content}) && $fsi...
2020 Feb 26
1
[PATCH] filesystems: fix size reporting for filesystems
...-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_handler (g, NULL, NULL);
+
+ if (guestfs_mount_ro (g, fses[i], "/") == 0) {
+ CLEANUP_FREE_STATVFS struct guest...
2015 Jun 02
2
Re: [PATCH 2/3] inspection: Add support for CoreOS
Sorry, I don't get it. In inspect.c line 67 you have this:
for (fs = fses; *fs; fs += 2) {
if (guestfs_int_check_for_filesystem_on (g, *fs)) {
guestfs_int_free_inspect_info (g);
return NULL;
}
}
I don't see the bug.
On 02/06/15 18:30, Richard W.M. Jones wrote:
> On Tue, Jun 02, 2015 at 06:18:38PM +0300, Nikos Skalkotos wrote:
>> On 02...
2014 May 05
2
[PATCH] test-charset-fidelity: allow to skip testing specific FSes
Allow to skip testing the filesystem "foo" if the environment variable
SKIP_TEST_CHARSET_FIDELITY_foo=1 is set. This way it possible to not
test one or more filesystems without disabling the test altogether.
---
tests/charsets/test-charset-fidelity.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/tests/charsets/test-charset-fidelity.c
2011 Apr 26
7
[PATCH 1/7] Push $desc creation into Sys::VirtConvert::Converter->convert
...quot;convert called without desc argument") unless defined($desc);
+ croak("convert called without root argument") unless defined($root);
croak("convert called without meta argument") unless defined($meta);
my $guestcaps;
+ # Mount up the disks.
+ my %fses = $g->inspect_get_mountpoints ($root);
+ my @fses = sort { length $a <=> length $b } keys %fses;
+ foreach (@fses) {
+ eval { $g->mount_options ("", $fses{$_}, $_) };
+ print __x("{e} (ignored)\n", e => $@) if $@;
+ }
+
+ # Construct the...
2015 Jun 04
3
[PATCH] Use safe_realloc() in favor of realloc overall.
...ect-fs.c
@@ -47,7 +47,7 @@ COMPILE_REGEXP (re_major_minor, "(\\d+)\\.(\\d+)", 0)
static int check_filesystem (guestfs_h *g, const char *mountable,
const struct guestfs_internal_mountable *m,
int whole_device);
-static int extend_fses (guestfs_h *g);
+static void extend_fses (guestfs_h *g);
static int get_partition_context (guestfs_h *g, const char *partition, int *partnum_ret, int *nr_partitions_ret);
/* Find out if 'device' contains a filesystem. If it does, add
@@ -75,8 +75,7 @@ guestfs_int_check_for_filesystem_o...
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
2017 Aug 09
0
[PATCH v12 09/11] daemon: Implement inspection of Linux and other Unix-like operating systems.
...)
+
+open Printf
+
+open Std_utils
+
+open Utils
+open Mountable
+open Inspect_types
+
+let re_primary_partition = PCRE.compile "^/dev/(?:h|s|v)d.[1234]$"
+
+let rec inspect_os () =
+ Mount.umount_all ();
+
+ (* Iterate over all detected filesystems. Inspect each one in turn. *)
+ let fses = Listfs.list_filesystems () in
+
+ let fses =
+ filter_map (
+ fun (mountable, vfs_type) ->
+ Inspect_fs.check_for_filesystem_on mountable vfs_type
+ ) fses in
+ if verbose () then (
+ eprintf "inspect_os: fses:\n";
+ List.iter (fun fs -> eprintf "%s&qu...
2017 Jul 31
0
[PATCH v11 08/10] daemon: Implement inspection of Linux and other Unix-like operating systems.
...)
+
+open Printf
+
+open Std_utils
+
+open Utils
+open Mountable
+open Inspect_types
+
+let re_primary_partition = Str.regexp "^/dev/(h\\|s\\|v)d.[1234]$"
+
+let rec inspect_os () =
+ Mount.umount_all ();
+
+ (* Iterate over all detected filesystems. Inspect each one in turn. *)
+ let fses = Listfs.list_filesystems () in
+
+ let fses =
+ filter_map (
+ fun (mountable, vfs_type) ->
+ Inspect_fs.check_for_filesystem_on mountable vfs_type
+ ) fses in
+ if verbose () then (
+ eprintf "inspect_os: fses:\n";
+ List.iter (fun fs -> eprintf "%s&qu...
2016 Feb 05
0
Re: [PATCH] inspect: get windows drive letters for GPT disks.
...to
> + * to libguestfs GPT partition device. For GPT disks, the blob is made of
> + * "DMIO:ID:" prefix followed by the GPT parition GUID.
> + */
> +static char *
> +map_registry_disk_blob_gpt (guestfs_h *g, const void *blob)
> +{
> + CLEANUP_FREE_STRING_LIST char **fses = NULL;
> + size_t i;
> +
> + fses = guestfs_list_filesystems (g);
> + if (fses == NULL)
> + return NULL;
Did you really mean to call guestfs_list_filesystems here? If you're
trying to get the list of partitions, then guestfs_list_partitions is
what you should be calling....