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 openzfs#15128
  • Loading branch information
oromenahar authored and behlendorf committed Aug 1, 2023
1 parent 789f95f commit dd9e14f
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 dd9e14f

Please sign in to comment.