mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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:
parent
c47f0f4417
commit
b5e2456333
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user