]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: add new return code 8 for ambivalent low-level probing result
authorKarel Zak <kzak@redhat.com>
Thu, 3 Feb 2011 11:59:58 +0000 (12:59 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 3 Feb 2011 11:59:58 +0000 (12:59 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/blkid.8
misc-utils/blkid.c

index 746ed39ee550dbc25275c0c95f617ec671556f43..05711ca8a908253120df43fab44d8ebe4bb688a8 100644 (file)
@@ -253,9 +253,15 @@ appear in
 are shown, if they are recognized.
 .SH "RETURN CODE"
 If the specified token was found, or if any tags were shown from (specified)
-devices, 0 is returned.  If the specified token was not found, or no
-(specified) devices could be identified, an exit code of 2 is returned.
+devices, 0 is returned.
+
+If the specified token was not found, or no (specified) devices could be
+identified an exit code of 2 is returned.
+
 For usage or other errors, an exit code of 4 is returned.
+
+If the ambivalent low-level probing result was detected an exit code of 8 is
+returned.
 .SH AUTHOR
 .B blkid
 was written by Andreas Dilger for libblkid and improved by Theodore Ts'o
index 4c846e93d143ab330cbe01f048af34045bc52967..53f2a69e62efcd00bd74792c4f4b07a745da8b86 100644 (file)
@@ -565,7 +565,13 @@ done:
                                devname);
        }
        close(fd);
-       return !nvals ? 2 : 0;
+
+       if (rc == -2)
+               return 8;       /* ambivalent probing result */
+       if (!nvals)
+               return 2;       /* nothing detected */
+
+       return 0;               /* sucess */
 }
 
 /* converts comma separated list to BLKID_USAGE_* mask */