svn commit: r344780 - head/stand/common

Simon J. Gerraty sjg at FreeBSD.org
Mon Mar 4 19:51:01 UTC 2019


Author: sjg
Date: Mon Mar  4 19:50:59 2019
New Revision: 344780
URL: https://svnweb.freebsd.org/changeset/base/344780

Log:
  Add -d flag to load command
  
  When doing load -t manifest -d increments debug level
  
  Reviewed by:	stevek

Modified:
  head/stand/common/module.c

Modified: head/stand/common/module.c
==============================================================================
--- head/stand/common/module.c	Mon Mar  4 19:39:59 2019	(r344779)
+++ head/stand/common/module.c	Mon Mar  4 19:50:59 2019	(r344780)
@@ -106,9 +106,9 @@ command_load(int argc, char *argv[])
     char	*typestr;
     char	*prefix;
     char	*skip;
-    int		dofile, dokld, ch, error;
+    int		dflag, dofile, dokld, ch, error;
 
-    dokld = dofile = 0;
+    dflag = dokld = dofile = 0;
     optind = 1;
     optreset = 1;
     typestr = NULL;
@@ -117,8 +117,11 @@ command_load(int argc, char *argv[])
 	return (CMD_CRIT);
     }
     prefix = skip = NULL;
-    while ((ch = getopt(argc, argv, "kp:s:t:")) != -1) {
+    while ((ch = getopt(argc, argv, "dkp:s:t:")) != -1) {
 	switch(ch) {
+	case 'd':
+	    dflag++;
+	    break;
 	case 'k':
 	    dokld = 1;
 	    break;
@@ -152,6 +155,8 @@ command_load(int argc, char *argv[])
 
 #ifdef LOADER_VERIEXEC
 	if (strncmp(typestr, "manifest", 8) == 0) {
+	    if (dflag > 0)
+		ve_debug_set(dflag);
 	    return (load_manifest(argv[1], prefix, skip, NULL));
 	}
 #endif


More information about the svn-src-head mailing list