Displaying 19 results from an estimated 19 matches for "filter_convert_old_lvs_output".
2016 Jan 27
4
[PATCH] lvm: support lvm2 older than 2.02.107
...,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_output (char *out)
+{
+ char *p, *pend;
+ DECLARE_STRINGSBUF (ret);
+
+ p = out;
+ while (p) {
+ size_t len;
+ char *saveptr;
+ char *lv_attr, *vg_name, *lv_name;
+
+ pend = strchr (p, '\n'); /* Get the next line of output. */
+ if (pend) {
+ *pend = '\0';
+ pe...
2017 Jul 14
0
[PATCH 14/27] daemon: Reimplement ‘lvs’ API in OCaml.
..._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_convert_old_lvs_output (char *out)
-{
- char *p, *pend;
- CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret);
-
- p = out;
- while (p) {
- size_t len;
- char *saveptr;
- char *lv_attr, *vg_name, *lv_name;
-
- pend = strchr (p, '\n'); /* Get the next line of output. */
- if (pend) {
- *pend =...
2016 Feb 12
1
[PATCH] daemon: lvm: Ignore LVs with the activationskip flag set (RHBZ#1306666).
...pening the device node. Note that 'guestfs_lvs_full' is
unaffected by this change.
---
daemon/lvm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/daemon/lvm.c b/daemon/lvm.c
index 8bef4d5..529e20d 100644
--- a/daemon/lvm.c
+++ b/daemon/lvm.c
@@ -157,6 +157,10 @@ filter_convert_old_lvs_output (char *out)
if (lv_attr[0] == 't')
goto skip_line;
+ /* Ignore activationskip (RHBZ#1306666). */
+ if (strlen (lv_attr) >= 10 && lv_attr[9] == 'k')
+ goto skip_line;
+
/* Ignore "unknown device" message (RHBZ#1054761). */
if (S...
2016 Jan 28
0
[PATCH v2] lvm: support lvm2 older than 2.02.107
...,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_output (char *out)
+{
+ char *p, *pend;
+ DECLARE_STRINGSBUF (ret);
+
+ p = out;
+ while (p) {
+ size_t len;
+ char *saveptr;
+ char *lv_attr, *vg_name, *lv_name;
+
+ pend = strchr (p, '\n'); /* Get the next line of output. */
+ if (pend) {
+ *pend = '\0';
+ pe...
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...char buf[256];
char *str;
@@ -100,7 +100,7 @@ convert_lvm_output (char *out, const char *prefix)
if (end_stringsbuf (&ret) == -1)
return NULL;
- return ret.argv;
+ return take_stringsbuf (&ret);
}
/* Filter a colon-separated output of
@@ -113,7 +113,7 @@ static char **
filter_convert_old_lvs_output (char *out)
{
char *p, *pend;
- DECLARE_STRINGSBUF (ret);
+ CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret);
p = out;
while (p) {
@@ -183,7 +183,7 @@ filter_convert_old_lvs_output (char *out)
if (end_stringsbuf (&ret) == -1)
return NULL;
- return ret.argv;
+ return ta...
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
---
2018 Apr 10
0
[PATCH v2 3/5] daemon: move Lvm.lv_canonical to new Lvm_utils module
...with
+ match Lvm_utils.lv_canonical spec with
| None -> Mountable.of_device spec
| Some device -> Mountable.of_device device
with
diff --git a/daemon/lvm.ml b/daemon/lvm.ml
index ed4ed7462..ef45ed4bc 100644
--- a/daemon/lvm.ml
+++ b/daemon/lvm.ml
@@ -97,30 +97,3 @@ and filter_convert_old_lvs_output out =
) lines in
List.sort compare lines
-
-(* Convert a non-canonical LV path like /dev/mapper/vg-lv or /dev/dm-0
- * to a canonical one.
- *
- * This is harder than it should be. A LV device like /dev/VG/LV is
- * really a symlink to a device-mapper device like /dev/dm-0. However
- * at...
2018 Apr 10
9
[PATCH v2 0/5] daemon: generate almall the API OCaml interfaces
Hi,
as a followup for the signature fix for mount_vfs [1], here it is a
patch series to generate automatically all the OCaml interfaces of
daemon actions.
[1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html
Thanks,
Pino Toscano (5):
daemon: directly use Optgroups
daemon: use the structs from the Structs module
daemon: move Lvm.lv_canonical to new Lvm_utils module
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 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here:
https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html
This series now depends on two small patches which I posted separately:
https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html
https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html
v1 -> v2:
- Previously changes to generator/daemon.ml were made incrementally
through the patch
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 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 Nov 21
2
[PATCH v3 0/2] common/mlstdutils: Extend the List module.
v2 -> v3:
- Renamed List.assoc_ -> List.assoc_lbl.
- Rebased on top of current master branch.
Rich.
2017 Oct 08
4
[PATCH 0/3] common/mlstdutils: Add Std_utils List and Option modules.
In Std_utils we already extend Char and String. These commits take it
a little further by extending List and adding a new Option submodule.
All basically simple refactoring.
Rich.
2017 Oct 08
7
[[PATCH v2 0/4] common/mlstdutils: Add Std_utils List and Option modules.
This time including the first commit ...
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 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 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
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.