btrfs-progs: update CHANGES for v4.16
[platform/upstream/btrfs-progs.git] / cmds-inspect.c
index ac3da61..afd7fe4 100644 (file)
@@ -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 <command> <args>",
@@ -54,7 +52,7 @@ static int __ino_to_path_fd(u64 inum, int fd, int verbose, const char *prepend)
 
        ret = ioctl(fd, BTRFS_IOC_INO_PATHS, &ipa);
        if (ret < 0) {
-               error("ino paths ioctl: %s", strerror(errno));
+               error("ino paths ioctl: %m");
                goto out;
        }
 
@@ -191,7 +189,7 @@ static int cmd_inspect_logical_resolve(int argc, char **argv)
 
        ret = ioctl(fd, BTRFS_IOC_LOGICAL_INO, &loi);
        if (ret < 0) {
-               error("logical ino ioctl: %s", strerror(errno));
+               error("logical ino ioctl: %m");
                goto out;
        }
 
@@ -320,7 +318,7 @@ 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;
@@ -526,7 +524,7 @@ static int print_min_dev_size(int fd, u64 devid)
 
                ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
                if (ret < 0) {
-                       error("tree search ioctl: %s", strerror(errno));
+                       error("tree search ioctl: %m");
                        ret = 1;
                        goto out;
                }