Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Mar 2019 19:51:00 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r344780 - head/stand/common
Message-ID:  <201903041951.x24Jp0tA025494@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201903041951.x24Jp0tA025494>