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;
}
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;
}
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 = 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;
}