Skip to content

Commit

Permalink
[autoboot] Use a custom error number for "nothing to boot"
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Feb 28, 2011
1 parent 7617e36 commit e583afb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/usr/autoboot.c
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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 ) );
}

Expand Down

0 comments on commit e583afb

Please sign in to comment.