Check the return value in clonefile test

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Rob Norris <rob.norris@klarasystems.com>
Signed-off-by: Kay Pedersen <mail@mkwg.de>
Closes #15128
This commit is contained in:
oromenahar 2023-08-01 17:26:12 +02:00 committed by Brian Behlendorf
parent c47f0f4417
commit b5e2456333

View File

@ -212,7 +212,7 @@ main(int argc, char **argv)
int dfd = open(argv[optind+1], O_WRONLY|O_CREAT, int dfd = open(argv[optind+1], O_WRONLY|O_CREAT,
S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH); S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (sfd < 0) { if (dfd < 0) {
fprintf(stderr, "open: %s: %s\n", fprintf(stderr, "open: %s: %s\n",
argv[optind+1], strerror(errno)); argv[optind+1], strerror(errno));
close(sfd); close(sfd);