From b643b2782a50973850658636949bd2b46bbd7907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Fri, 4 Jun 2021 23:51:57 +0200 Subject: [PATCH] libzfs: write_inuse_diffs_one: format strerror() with "%s" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: 50353dbd05a771378ef2eebd3bcb4ab5a0029f43 ("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 --- lib/libzfs/libzfs_diff.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libzfs/libzfs_diff.c b/lib/libzfs/libzfs_diff.c index 9b256fff722d..d46e23a2fc0e 100644 --- a/lib/libzfs/libzfs_diff.c +++ b/lib/libzfs/libzfs_diff.c @@ -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 @@ -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); } }