mirror of
https://github.com/kdave/btrfs-progs
synced 2025-02-03 03:11:46 +00:00
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>
This commit is contained in:
parent
8ad8e789fc
commit
3f388b9690
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user