]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
fincore: fix error on open()
authorKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2017 14:28:05 +0000 (15:28 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 23 Mar 2017 14:28:05 +0000 (15:28 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/fincore.c

index ddb2bb267ccac98addfedf5e48eff016d16eec80..a2fc1d1113514940633f5dd87b38ef11d92c8a0e 100644 (file)
@@ -221,7 +221,7 @@ static int fincore_name(struct fincore_control *ctl,
 
        if ((fd = open (name, O_RDONLY)) < 0) {
                warn(_("failed to open: %s"), name);
-               return 0;
+               return -errno;
        }
 
        if (fstat (fd, sb) < 0) {