ri->ref_tree = 0;
return -ENOENT;
}
- error("failed to lookup path for root %llu: %s",
- (unsigned long long)ri->ref_tree, strerror(errno));
+ error("failed to lookup path for root %llu: %m",
+ (unsigned long long)ri->ref_tree);
return ret;
}
/* this ioctl fills in ino_args->treeid */
ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &ino_args);
if (ret < 0) {
- error("failed to lookup path for dirid %llu: %s",
- (unsigned long long)BTRFS_FIRST_FREE_OBJECTID,
- strerror(errno));
+ error("failed to lookup path for dirid %llu: %m",
+ (unsigned long long)BTRFS_FIRST_FREE_OBJECTID);
return 0;
}
while (1) {
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
if (ret < 0) {
- error("can't perform the search: %s", strerror(errno));
+ error("can't perform the search: %m");
return 0;
}
/* the ioctl returns the number of item it found in nr_items */
ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args);
if (ret < 0) {
- error("failed to lookup path for dirid %llu: %s",
- (unsigned long long)dirid, strerror(errno));
+ error("failed to lookup path for dirid %llu: %m",
+ (unsigned long long)dirid);
return ERR_PTR(ret);
}
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
if (ret < 0) {
- error("can't perform the search: %s", strerror(errno));
+ error("can't perform the search: %m");
return NULL;
}
/* the ioctl returns the number of item it found in nr_items */
ret = list_subvol_search(fd, root_lookup);
if (ret) {
- error("can't perform the search: %s", strerror(errno));
+ error("can't perform the search: %m");
return ret;
}
while(1) {
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
if (ret < 0) {
- error("can't perform the search: %s", strerror(errno));
+ error("can't perform the search: %m");
break;
}
/* the ioctl returns the number of item it found in nr_items */
ret = lookup_path_rootid(fd, treeid);
if (ret < 0)
- error("cannot resolve rootid for path: %s",
- strerror(errno));
+ error("cannot resolve rootid for path: %m");
return ret;
}