X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cmds-inspect.c;h=885f3abe5b0bfe72156cd2e9eec09fa2c067f0e6;hb=94afa11d832901cd63766ec38b60752058722a7b;hp=6d4e2b8716fd7e287dc4481675a74049ddf40343;hpb=34673ebeb097478f9afd38032924839b2010b5e7;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/cmds-inspect.c b/cmds-inspect.c index 6d4e2b8..885f3ab 100644 --- a/cmds-inspect.c +++ b/cmds-inspect.c @@ -31,9 +31,7 @@ #include "disk-io.h" #include "commands.h" #include "btrfs-list.h" -#include "cmds-inspect-dump-tree.h" -#include "cmds-inspect-dump-super.h" -#include "cmds-inspect-tree-stats.h" +#include "help.h" static const char * const inspect_cmd_group_usage[] = { "btrfs inspect-internal ", @@ -173,7 +171,7 @@ static int cmd_inspect_logical_resolve(int argc, char **argv) if (check_argc_exact(argc - optind, 2)) usage(cmd_inspect_logical_resolve_usage); - size = min(size, (u64)64 * 1024); + size = min(size, (u64)SZ_64K); inodes = malloc(size); if (!inodes) return 1; @@ -320,13 +318,13 @@ static int cmd_inspect_rootid(int argc, char **argv) if (check_argc_exact(argc - optind, 1)) usage(cmd_inspect_rootid_usage); - fd = btrfs_open_dir(argv[optind], &dirstream, 1); + fd = btrfs_open_file_or_dir(argv[optind], &dirstream, 1); if (fd < 0) { ret = -ENOENT; goto out; } - ret = lookup_ino_rootid(fd, &rootid); + ret = lookup_path_rootid(fd, &rootid); if (ret) { error("failed to lookup root id: %s", strerror(-ret)); goto out; @@ -486,7 +484,7 @@ static void adjust_dev_min_size(struct list_head *extents, * chunk tree, so often this can lead to the need of allocating * a new system chunk too, which has a maximum size of 32Mb. */ - *min_size += 32 * 1024 * 1024; + *min_size += SZ_32M; } } @@ -500,7 +498,7 @@ static int print_min_dev_size(int fd, u64 devid) * possibility of deprecating/removing it has been discussed, so we * ignore it here. */ - u64 min_size = 1 * 1024 * 1024ull; + u64 min_size = SZ_1M; struct btrfs_ioctl_search_args args; struct btrfs_ioctl_search_key *sk = &args.key; u64 last_pos = (u64)-1;