udev-builtin-blkid: use -errno not -1 as error code
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 Feb 2017 21:42:46 +0000 (16:42 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 21 Feb 2017 21:42:51 +0000 (16:42 -0500)
The code that calls this function doesn't care, but it looks bad.

src/udev/udev-builtin-blkid.c

index 856376f..9037aa1 100644 (file)
@@ -193,7 +193,7 @@ static int probe_superblocks(blkid_probe pr) {
         int rc;
 
         if (fstat(blkid_probe_get_fd(pr), &st))
-                return -1;
+                return -errno;
 
         blkid_probe_enable_partitions(pr, 1);