]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[autoboot] Use a custom error number for "nothing to boot"
authorMichael Brown <mcb30@ipxe.org>
Mon, 28 Feb 2011 18:43:54 +0000 (18:43 +0000)
committerMichael Brown <mcb30@ipxe.org>
Mon, 28 Feb 2011 18:43:54 +0000 (18:43 +0000)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/usr/autoboot.c

index 407e73869853d6538eedcf7825e40b75f7489537..0fe00b3601b0f3386412684f102135c07ce2d553 100644 (file)
@@ -41,6 +41,11 @@ FILE_LICENCE ( GPL2_OR_LATER );
  *
  */
 
+/* Disambiguate the various error causes */
+#define ENOENT_BOOT __einfo_error ( EINFO_ENOENT_BOOT )
+#define EINFO_ENOENT_BOOT \
+       __einfo_uniqify ( EINFO_ENOENT, 0x01, "Nothing to boot" )
+
 /**
  * Perform PXE menu boot when PXE stack is not available
  */
@@ -185,7 +190,7 @@ int uriboot ( struct uri *filename, struct uri *root_path ) {
                        rc = 0;
                }
        } else {
-               rc = -ENOENT;
+               rc = -ENOENT_BOOT;
                printf ( "Nothing to boot: %s\n", strerror ( rc ) );
        }