search for: convert_lvm_output

Displaying 20 results from an estimated 20 matches for "convert_lvm_output".

2016 Jan 27
4
[PATCH] lvm: support lvm2 older than 2.02.107
...m.c b/daemon/lvm.c index 979cf63..604e106 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -26,6 +26,7 @@ #include <fcntl.h> #include <sys/stat.h> #include <dirent.h> +#include <assert.h> #include "daemon.h" #include "c-ctype.h" @@ -103,6 +104,85 @@ convert_lvm_output (char *out, const char *prefix) return ret.argv; } +/* Filter a colon-separated output of + * lvs -o lv_attr,vg_name,lv_name + * removing thin layouts, and building the device path as we expect it. + * + * This is used only when lvm has no -S. + */ +static char ** +filter_convert_old_lvs_ou...
2016 Jan 28
0
[PATCH v2] lvm: support lvm2 older than 2.02.107
...uld be good enough for our need. --- daemon/lvm.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 136 insertions(+), 11 deletions(-) diff --git a/daemon/lvm.c b/daemon/lvm.c index 979cf63..8bef4d5 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -103,6 +103,85 @@ convert_lvm_output (char *out, const char *prefix) return ret.argv; } +/* Filter a colon-separated output of + * lvs -o lv_attr,vg_name,lv_name + * removing thin layouts, and building the device path as we expect it. + * + * This is used only when lvm has no -S. + */ +static char ** +filter_convert_old_lvs_ou...
2017 Jul 14
0
[PATCH 14/27] daemon: Reimplement ‘lvs’ API in OCaml.
...ount.mli \ mountable.mli \ parted.mli \ @@ -283,6 +284,7 @@ SOURCES_ML = \ is.ml \ ldm.ml \ link.ml \ + lvm.ml \ mount.ml \ parted.ml \ realpath.ml \ diff --git a/daemon/lvm.c b/daemon/lvm.c index 5d12b009f..072bf53b4 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -103,89 +103,6 @@ convert_lvm_output (char *out, const char *prefix) return take_stringsbuf (&ret); } -/* Filter a colon-separated output of - * lvs -o lv_attr,vg_name,lv_name - * removing thin layouts, and building the device path as we expect it. - * - * This is used only when lvm has no -S. - */ -static char ** -filter_...
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...- return ret.argv; - - error: - if (ret.argv) - free_stringslen (ret.argv, ret.size); - return NULL; + return take_stringsbuf (&ret); } int diff --git a/daemon/lvm.c b/daemon/lvm.c index 2b61357..093e682 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -48,7 +48,7 @@ static char ** convert_lvm_output (char *out, const char *prefix) { char *p, *pend; - DECLARE_STRINGSBUF (ret); + CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret); size_t len; char buf[256]; char *str; @@ -100,7 +100,7 @@ convert_lvm_output (char *out, const char *prefix) if (end_stringsbuf (&ret) == -1)...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it, as that string would have been owned by the stringbuf. Adapt few places to this behaviour. --- daemon/btrfs.c | 4 +--- daemon/devsparts.c | 8 ++++---- daemon/guestfsd.c | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 9b52aa8..d70565a 100644 ---
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2009 Sep 24
1
enabling more syntax-checks
...22,9 +22,9 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> -#include <ctype.h> #include "daemon.h" +#include "c-ctype.h" #include "actions.h" /* LVM actions. Keep an eye on liblvm, although at the time @@ -49,12 +49,12 @@ convert_lvm_output (char *out, const char *prefix) pend++; } - while (*p && isspace (*p)) /* Skip any leading whitespace. */ + while (*p && c_isspace (*p)) /* Skip any leading whitespace. */ p++; /* Sigh, skip trailing whitespace too. "pvs", I'm looking a...
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
...l: Use Unix_utils.Mkdtemp instead of making by hand, and clean up afterwards. - daemon/ldm.ml: Factor the two functions as far as possible. - daemon/lvm.ml: Readd the comment above lvs_has_S_opt which was accidentally dropped during conversion. - daemon/lvm.ml: Optimize handling of prefix in convert_lvm_output. - daemon/optgroups.c: Remove unnecessary <stdio.h>, <stdlib.h> additions. - daemon/optgroups.c: Use optgroup_names so we don't need to check for non-retired groups. - daemon/btrfs.ml: Rewrite ‘with_mounted’ helper to use Mkdtemp. - daemon/btrfs.ml: Filter empty lines. - daem...
2017 Jun 05
19
[PATCH v3 00/19] Allow APIs to be implemented in OCaml.
v2 was here: https://www.redhat.com/archives/libguestfs/2017-June/msg00008.html This series gets as far as a working (and faster) reimplementation of ‘guestfs_list_filesystems’. I also have another patch series on top of this one which reimplements the inspection APIs inside the daemon, but that needs a bit more work still, since inspection turns out to be a very large piece of code. 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 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.
2017 Jul 27
0
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
..."lvm", "lvs", "-o", "vg_name,lv_name", "-S", "lv_role=public && lv_skip_activation!=yes", "--noheadings", @@ -276,7 +274,7 @@ do_lvs (void) return convert_lvm_output (out, "/dev/"); } else { r = command (&out, &err, - str_lvm, "lvs", + "lvm", "lvs", "-o", "lv_attr,vg_name,lv_name", "--noheadings",...
2017 Jul 24
0
[PATCH 2/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
..."lvm", "lvs", "-o", "vg_name,lv_name", "-S", "lv_role=public && lv_skip_activation!=yes", "--noheadings", @@ -276,7 +276,7 @@ do_lvs (void) return convert_lvm_output (out, "/dev/"); } else { r = command (&out, &err, - str_lvm, "lvs", + "lvm", "lvs", "-o", "lv_attr,vg_name,lv_name", "--noheadings",...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of: https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html [PATCH 00/12] Refactor utility functions. plus: https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html [PATCH v3 00/19] Allow APIs to be implemented in OCaml. with the second patches rebased on top of the utility refactoring, and some other adjustments and extensions. This passes
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html and this requires the utilities refactoring posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html Inspection is now complete[*], although not very well tested. I'm intending to compare the output of many guests using old & new virt-inspector to see if I can find any
2017 Jul 27
3
[PATCH v2] daemon: Remove GUESTFSD_EXT_CMD.
This is a simpler patch that removes GUESTFSD_EXT_CMD completely.
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid