util: Delete the execfile m5 utility command.
authorGabe Black <gabeblack@google.com>
Thu, 26 Mar 2020 00:53:02 +0000 (17:53 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 28 Apr 2020 01:07:43 +0000 (01:07 +0000)
This command was just a thin wrapper around the readfile command, and
can be easily duplicated by piping the output of that command to
/tmp/execfile and then running it.

Change-Id: Ib77166ee9f07571d57e4d21e9615def55e5391a8
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27233
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Bobby R. Bruce <bbruce@ucdavis.edu>
util/m5/src/m5.c

index de382d08860ce5dd328ec4563dc8aa45f3e5c992..6e3efac223ce9ab68a6262788f57e0d168479dff 100644 (file)
@@ -225,23 +225,6 @@ do_write_file(int argc, char *argv[])
     write_file(filename, host_filename);
 }
 
-void
-do_exec_file(int argc, char *argv[])
-{
-    if (argc > 0)
-        usage();
-
-    const char *destname = "/tmp/execfile";
-
-    int fid = open(destname, O_WRONLY, 0777);
-    int len = read_file(fid);
-    close(fid);
-    if (len > 0) {
-        execl(destname, "execfile", NULL);
-        err(1, "execl failed!");
-    }
-}
-
 void
 do_checkpoint(int argc, char *argv[])
 {
@@ -306,9 +289,6 @@ struct MainFunc mainfuncs[] = {
                                              "delay (default 0) dump the "
                                              "stats, and then optionally "
                                              "every period after" },
-    { "execfile",       do_exec_file,        "read a preselected file into "
-                                             "/tmp/execfile and then exec() "
-                                             "it" },
     { "exit",           do_exit,             "[delay] // Exit after delay, "
                                              "or immediately" },
     { "fail",           do_fail,             "<code> [delay] // Exit with "