Skip to content

Commit 07e9aa6

Browse files
committed
flux-fsck: fix error message output
Problem: An error check inadvertently checks `errno` when it should check the stored errnum in a data structure. This leads to an invalid error message output. Fix the error check to ensure the correct error message is output. Fixes #6860
1 parent 128e84a commit 07e9aa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/builtin/fsck.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ static void fsck_valref (flux_t *h, const char *path, json_t *treeobj)
147147
if (fvd.errorcount) {
148148
/* each invalid blobref will be output in verbose mode */
149149
if (!verbose) {
150-
if (errno == ENOENT)
150+
if (fvd.errnum == ENOENT)
151151
read_error ("%s: missing blobref(s)", path);
152152
else
153153
read_error ("%s: error retrieving blobref(s): %s",

0 commit comments

Comments
 (0)