Skip to content

Commit

Permalink
Check the return value in clonefile test
Browse files Browse the repository at this point in the history
Reviewed-by: Brian Atkinson <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Rob Norris <[email protected]>
Signed-off-by: Kay Pedersen <[email protected]>
Closes #15128
  • Loading branch information
oromenahar authored Aug 1, 2023
1 parent b22bab2 commit e9c5931
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/zfs-tests/cmd/clonefile.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ main(int argc, char **argv)

int dfd = open(argv[optind+1], O_WRONLY|O_CREAT,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (sfd < 0) {
if (dfd < 0) {
fprintf(stderr, "open: %s: %s\n",
argv[optind+1], strerror(errno));
close(sfd);
Expand Down

0 comments on commit e9c5931

Please sign in to comment.