summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-18 10:31:42 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2008-04-18 10:31:42 -0400
commit588bb9dfff98de27e17ce0e92079c032f8dc5a21 (patch)
tree6ccd424450226987db38446f363ebb8edc196a14 /volumes.c
parentd25165e95c5c7d8f08f9abd974f706ae5ef25201 (diff)
downloadbtrfs-progs-588bb9dfff98de27e17ce0e92079c032f8dc5a21.tar.gz
Add support for filesystem labels via mkfs.btrfs -L
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/volumes.c b/volumes.c
index a923388..cfe0f34 100644
--- a/volumes.c
+++ b/volumes.c
@@ -128,7 +128,6 @@ static int device_list_add(const char *path,
}
if (fs_devices->lowest_devid > devid) {
fs_devices->lowest_devid = devid;
- printk("lowest devid now %llu\n", (unsigned long long)devid);
}
*fs_devices_ret = fs_devices;
return 0;
@@ -184,6 +183,7 @@ int btrfs_scan_one_device(int fd, const char *path,
char *buf;
int ret;
u64 devid;
+ char uuidbuf[37];
buf = malloc(4096);
if (!buf) {
@@ -203,7 +203,14 @@ int btrfs_scan_one_device(int fd, const char *path,
}
devid = le64_to_cpu(disk_super->dev_item.devid);
*total_devs = btrfs_super_num_devices(disk_super);
- printk("found device %llu on %s\n", (unsigned long long)devid, path);
+ uuid_unparse(disk_super->fsid, uuidbuf);
+
+ printf("device ");
+ if (disk_super->label[0])
+ printf("label %s ", disk_super->label);
+ else
+ printf("fsuuid %s ", uuidbuf);
+ printf("devid %llu %s\n", (unsigned long long)devid, path);
ret = device_list_add(path, disk_super, devid, fs_devices_ret);
error_brelse: