- make btrfs filesystem show <uuid> actually work (rhbz# 816293)
This commit is contained in:
parent
8bffa86e0b
commit
758d90d42c
|
@ -0,0 +1,37 @@
|
||||||
|
From 33cbabf480ea811ddaef1b5f97603f4c7df7b240 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Josef Bacik <josef@redhat.com>
|
||||||
|
Date: Wed, 25 Apr 2012 14:25:24 -0400
|
||||||
|
Subject: [PATCH] Btrfs-progs: make btrfs filesystem show <uuid> 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 <josef@redhat.com>
|
||||||
|
---
|
||||||
|
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
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
Name: btrfs-progs
|
Name: btrfs-progs
|
||||||
Version: 0.19
|
Version: 0.19
|
||||||
Release: 18%{?dist}
|
Release: 19%{?dist}
|
||||||
Summary: Userspace programs for btrfs
|
Summary: Userspace programs for btrfs
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
|
@ -11,6 +11,7 @@ Patch0: btrfs-progs-upstream.patch
|
||||||
Patch1: btrfs-progs-fix-labels.patch
|
Patch1: btrfs-progs-fix-labels.patch
|
||||||
Patch2: btrfs-progs-valgrind.patch
|
Patch2: btrfs-progs-valgrind.patch
|
||||||
Patch3: btrfs-progs-build-fixes.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)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: e2fsprogs-devel, libuuid-devel, zlib-devel, libacl-devel
|
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
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
|
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}
|
||||||
|
@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||||
%{_mandir}/man8/btrfs.8.gz
|
%{_mandir}/man8/btrfs.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 25 2012 Josef Bacik <josef@toxicpanda.com> 0.19-19
|
||||||
|
- make btrfs filesystem show <uuid> actually work (rhbz# 816293)
|
||||||
|
|
||||||
* Wed Apr 11 2012 Josef Bacik <josef@toxicpanda.com> 0.19-18
|
* Wed Apr 11 2012 Josef Bacik <josef@toxicpanda.com> 0.19-18
|
||||||
- updated to latest btrfs-progs
|
- updated to latest btrfs-progs
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue