From e583afb977d703d239d0827b78abbf5d54996c3d Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 28 Feb 2011 18:43:54 +0000 Subject: [PATCH] [autoboot] Use a custom error number for "nothing to boot" Signed-off-by: Michael Brown --- src/usr/autoboot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c index 407e7386..0fe00b36 100644 --- a/src/usr/autoboot.c +++ b/src/usr/autoboot.c @@ -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 ) ); }