Przeglądaj źródła

[autoboot] Use a custom error number for "nothing to boot"

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 lat temu
rodzic
commit
e583afb977
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6
    1
      src/usr/autoboot.c

+ 6
- 1
src/usr/autoboot.c Wyświetl plik

@@ -41,6 +41,11 @@ FILE_LICENCE ( GPL2_OR_LATER );
41 41
  *
42 42
  */
43 43
 
44
+/* Disambiguate the various error causes */
45
+#define ENOENT_BOOT __einfo_error ( EINFO_ENOENT_BOOT )
46
+#define EINFO_ENOENT_BOOT \
47
+	__einfo_uniqify ( EINFO_ENOENT, 0x01, "Nothing to boot" )
48
+
44 49
 /**
45 50
  * Perform PXE menu boot when PXE stack is not available
46 51
  */
@@ -185,7 +190,7 @@ int uriboot ( struct uri *filename, struct uri *root_path ) {
185 190
 			rc = 0;
186 191
 		}
187 192
 	} else {
188
-		rc = -ENOENT;
193
+		rc = -ENOENT_BOOT;
189 194
 		printf ( "Nothing to boot: %s\n", strerror ( rc ) );
190 195
 	}
191 196
 

Ładowanie…
Anuluj
Zapisz