Browse Source

[image] Added "chain" command to fetch, load, and execute image

The "chain" command combines the functions of "imgfetch", "imgload",
and "boot".

    chain http://etherboot.org/gtest/gtest.gpxe

is equivalent to:

    kernel http://etherboot.org/gtest/gtest.gpxe
    boot
tags/v0.9.7
Shao Miller 15 years ago
parent
commit
43834f5d25
1 changed files with 20 additions and 0 deletions
  1. 20
    0
      src/hci/commands/image_cmd.c

+ 20
- 0
src/hci/commands/image_cmd.c View File

221
 	return 0;
221
 	return 0;
222
 }
222
 }
223
 
223
 
224
+/**
225
+ * The "imgauto" command
226
+ *
227
+ * @v argc		Argument count
228
+ * @v argv		Argument list
229
+ * @ret rc		Exit code
230
+ */
231
+static int imgauto_exec ( int argc, char **argv) {
232
+	int rc;
233
+
234
+	if ( ( rc = imgfetch_core_exec ( NULL, IMG_EXEC, argc, argv ) ) != 0 )
235
+		return rc;
236
+
237
+	return 0;
238
+}
239
+
224
 /**
240
 /**
225
  * "imgload" command syntax message
241
  * "imgload" command syntax message
226
  *
242
  *
546
 		.name = "kernel",
562
 		.name = "kernel",
547
 		.exec = kernel_exec,
563
 		.exec = kernel_exec,
548
 	},
564
 	},
565
+	{
566
+		.name = "imgauto",
567
+		.exec = imgauto_exec,
568
+	},
549
 	{
569
 	{
550
 		.name = "imgload",
570
 		.name = "imgload",
551
 		.exec = imgload_exec,
571
 		.exec = imgload_exec,

Loading…
Cancel
Save