Skip to content

Commit

Permalink
libzfs: write_inuse_diffs_one: format strerror() with "%s"
Browse files Browse the repository at this point in the history
Fixes: 50353db ("Let zfs diff be more
 permissive")
Ref: https://github.com/nabijaczleweli/zfs/runs/2749781519?check_suite_focus=true#step:6:1425
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
  • Loading branch information
nabijaczleweli committed Jun 4, 2021
1 parent 2ba7a9e commit b643b27
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/libzfs/libzfs_diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ write_inuse_diffs_one(FILE *fp, differ_info_t *di, uint64_t dobj)
fobjerr = get_stats_for_obj(di, di->fromsnap, dobj, fobjname,
MAXPATHLEN, &fsb);
if (fobjerr && di->zerr != ENOTSUP && di->zerr != ENOENT) {
zfs_error_aux(di->zhp->zfs_hdl, strerror(di->zerr));
zfs_error_aux(di->zhp->zfs_hdl, "%s", strerror(di->zerr));
zfs_error(di->zhp->zfs_hdl, di->zerr, di->errbuf);
/*
* Let's not print an error for the same object more than
Expand All @@ -276,7 +276,8 @@ write_inuse_diffs_one(FILE *fp, differ_info_t *di, uint64_t dobj)

if (tobjerr && di->zerr != ENOTSUP && di->zerr != ENOENT) {
if (!already_logged) {
zfs_error_aux(di->zhp->zfs_hdl, strerror(di->zerr));
zfs_error_aux(di->zhp->zfs_hdl,
"%s", strerror(di->zerr));
zfs_error(di->zhp->zfs_hdl, di->zerr, di->errbuf);
}
}
Expand Down

0 comments on commit b643b27

Please sign in to comment.