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 GitHub
parent b22bab2547
commit e9c59310f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

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);