瀏覽代碼

[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 年之前
父節點
當前提交
43834f5d25
共有 1 個文件被更改,包括 20 次插入0 次删除
  1. 20
    0
      src/hci/commands/image_cmd.c

+ 20
- 0
src/hci/commands/image_cmd.c 查看文件

@@ -221,6 +221,22 @@ static int kernel_exec ( int argc, char **argv ) {
221 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 241
  * "imgload" command syntax message
226 242
  *
@@ -546,6 +562,10 @@ struct command image_commands[] __command = {
546 562
 		.name = "kernel",
547 563
 		.exec = kernel_exec,
548 564
 	},
565
+	{
566
+		.name = "imgauto",
567
+		.exec = imgauto_exec,
568
+	},
549 569
 	{
550 570
 		.name = "imgload",
551 571
 		.exec = imgload_exec,

Loading…
取消
儲存