projects
/
platform
/
upstream
/
btrfs-progs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Set license using %license
[platform/upstream/btrfs-progs.git]
/
btrfs-list.c
diff --git
a/btrfs-list.c
b/btrfs-list.c
index
b6d7658
..
e01c589
100644
(file)
--- a/
btrfs-list.c
+++ b/
btrfs-list.c
@@
-644,8
+644,8
@@
static int lookup_ino_path(int fd, struct root_info *ri)
ri->ref_tree = 0;
return -ENOENT;
}
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;
}
return ret;
}
@@
-695,9
+695,8
@@
static u64 find_root_gen(int fd)
/* this ioctl fills in ino_args->treeid */
ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &ino_args);
if (ret < 0) {
/* 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;
}
return 0;
}
@@
-721,7
+720,7
@@
static u64 find_root_gen(int fd)
while (1) {
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
if (ret < 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 */
return 0;
}
/* the ioctl returns the number of item it found in nr_items */
@@
-781,8
+780,8
@@
static char *__ino_resolve(int fd, u64 dirid)
ret = ioctl(fd, BTRFS_IOC_INO_LOOKUP, &args);
if (ret < 0) {
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);
}
return ERR_PTR(ret);
}
@@
-860,7
+859,7
@@
static char *ino_resolve(int fd, u64 ino, u64 *cache_dirid, char **cache_name)
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
if (ret < 0) {
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 */
return NULL;
}
/* the ioctl returns the number of item it found in nr_items */
@@
-1496,7
+1495,7
@@
static int btrfs_list_subvols(int fd, struct root_lookup *root_lookup)
ret = list_subvol_search(fd, root_lookup);
if (ret) {
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;
}
return ret;
}
@@
-1732,7
+1731,7
@@
int btrfs_list_find_updated_files(int fd, u64 root_id, u64 oldest_gen)
while(1) {
ret = ioctl(fd, BTRFS_IOC_TREE_SEARCH, &args);
if (ret < 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"
);
break;
}
/* the ioctl returns the number of item it found in nr_items */
break;
}
/* the ioctl returns the number of item it found in nr_items */
@@
-1926,8
+1925,7
@@
int btrfs_list_get_path_rootid(int fd, u64 *treeid)
ret = lookup_path_rootid(fd, treeid);
if (ret < 0)
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;
}
return ret;
}