- Handle btrfs subvolume name '@' as used in SLE12 (bnc#900346)

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=321
This commit is contained in:
Olaf Hering 2014-10-16 11:27:06 +00:00 committed by Git OBS Bridge
parent 5b20983ebf
commit 33d5907880
2 changed files with 35 additions and 0 deletions

View File

@ -16,3 +16,33 @@ index 0000000..8b13789
+++ b/pkg-hotfix.txt +++ b/pkg-hotfix.txt
@@ -0,0 +1 @@ @@ -0,0 +1 @@
+ +
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 7a4d43d..ceea593 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -356,6 +356,7 @@ do_btrfs_subvolume_list (const mountable_t *fs)
ADD_ARG (argv, i, str_btrfs);
ADD_ARG (argv, i, "subvolume");
ADD_ARG (argv, i, "list");
+ ADD_ARG (argv, i, "-a");
ADD_ARG (argv, i, fs_buf);
ADD_ARG (argv, i, NULL);
diff --git a/src/listfs.c b/src/listfs.c
index ffb0adc..db127ea 100644
--- a/src/listfs.c
+++ b/src/listfs.c
@@ -176,9 +183,12 @@ check_with_vfs_type (guestfs_h *g, const char *device, struct stringsbuf *sb)
for (size_t i = 0; i < vols->len; i++) {
struct guestfs_btrfssubvolume *this = &vols->val[i];
+ char *btrfssubvolume_path = this->btrfssubvolume_path;
+ guestfs___trace(g, "XXX %s(%u) device %s btrfssubvolume_path %s", __func__, __LINE__, device, btrfssubvolume_path);
+ if (STREQ(btrfssubvolume_path, "<FS_TREE>/@")) btrfssubvolume_path = "/@";
guestfs___add_sprintf (g, sb,
"btrfsvol:%s/%s",
- device, this->btrfssubvolume_path);
+ device, btrfssubvolume_path);
guestfs___add_string (g, sb, "btrfs");
}

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Oct 16 13:26:13 CEST 2014 - ohering@suse.de
- Handle btrfs subvolume name '@' as used in SLE12 (bnc#900346)
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Oct 14 10:34:12 CEST 2014 - ohering@suse.de Tue Oct 14 10:34:12 CEST 2014 - ohering@suse.de