diff --git a/Btrfs-progs-make-btrfs-filesystem-show-uuid-actually.patch b/Btrfs-progs-make-btrfs-filesystem-show-uuid-actually.patch new file mode 100644 index 0000000..8e17bad --- /dev/null +++ b/Btrfs-progs-make-btrfs-filesystem-show-uuid-actually.patch @@ -0,0 +1,37 @@ +From 33cbabf480ea811ddaef1b5f97603f4c7df7b240 Mon Sep 17 00:00:00 2001 +From: Josef Bacik +Date: Wed, 25 Apr 2012 14:25:24 -0400 +Subject: [PATCH] Btrfs-progs: make btrfs filesystem show actually work + +The btrfs filesystem show command is only actually searching for labels, +it's not searching for UUID's at all. This patch fixes that problem. +Thanks, + +Signed-off-by: Josef Bacik +--- + cmds-filesystem.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/cmds-filesystem.c b/cmds-filesystem.c +index 1f53d1c..ff98a77 100644 +--- a/cmds-filesystem.c ++++ b/cmds-filesystem.c +@@ -155,8 +155,15 @@ static int cmd_df(int argc, char **argv) + + static int uuid_search(struct btrfs_fs_devices *fs_devices, char *search) + { ++ char uuidbuf[37]; + struct list_head *cur; + struct btrfs_device *device; ++ int search_len = strlen(search); ++ ++ search_len = min(search_len, 37); ++ uuid_unparse(fs_devices->fsid, uuidbuf); ++ if (!strncmp(uuidbuf, search, search_len)) ++ return 1; + + list_for_each(cur, &fs_devices->devices) { + device = list_entry(cur, struct btrfs_device, dev_list); +-- +1.7.7.6 + diff --git a/btrfs-progs.spec b/btrfs-progs.spec index 16620e2..62240f4 100644 --- a/btrfs-progs.spec +++ b/btrfs-progs.spec @@ -1,6 +1,6 @@ Name: btrfs-progs Version: 0.19 -Release: 18%{?dist} +Release: 19%{?dist} Summary: Userspace programs for btrfs Group: System Environment/Base @@ -11,6 +11,7 @@ Patch0: btrfs-progs-upstream.patch Patch1: btrfs-progs-fix-labels.patch Patch2: btrfs-progs-valgrind.patch Patch3: btrfs-progs-build-fixes.patch +Patch4: Btrfs-progs-make-btrfs-filesystem-show-uuid-actually.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: e2fsprogs-devel, libuuid-devel, zlib-devel, libacl-devel @@ -27,6 +28,7 @@ check, modify and correct any inconsistencies in the btrfs filesystem. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 %build make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags} @@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man8/btrfs.8.gz %changelog +* Wed Apr 25 2012 Josef Bacik 0.19-19 +- make btrfs filesystem show actually work (rhbz# 816293) + * Wed Apr 11 2012 Josef Bacik 0.19-18 - updated to latest btrfs-progs