mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
libzfs: write_inuse_diffs_one: format strerror() with "%s"
Fixes 50353dbd
("Let zfs diff be more permissive") which accidentally
introduced a build warning.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12197
This commit is contained in:
parent
2ba7a9e5cc
commit
e5e76bd643
@ -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,
|
fobjerr = get_stats_for_obj(di, di->fromsnap, dobj, fobjname,
|
||||||
MAXPATHLEN, &fsb);
|
MAXPATHLEN, &fsb);
|
||||||
if (fobjerr && di->zerr != ENOTSUP && di->zerr != ENOENT) {
|
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);
|
zfs_error(di->zhp->zfs_hdl, di->zerr, di->errbuf);
|
||||||
/*
|
/*
|
||||||
* Let's not print an error for the same object more than
|
* Let's not print an error for the same object more than
|
||||||
@ -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 (tobjerr && di->zerr != ENOTSUP && di->zerr != ENOENT) {
|
||||||
if (!already_logged) {
|
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);
|
zfs_error(di->zhp->zfs_hdl, di->zerr, di->errbuf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user