svn commit: r324380 - stable/11/usr.sbin/cpucontrol
Konstantin Belousov
kib at FreeBSD.org
Sat Oct 7 08:42:37 UTC 2017
Author: kib
Date: Sat Oct 7 08:42:36 2017
New Revision: 324380
URL: https://svnweb.freebsd.org/changeset/base/324380
Log:
MFC r324113:
Allow to disable default microcode updates search path with the new
'-n' option.
Modified:
stable/11/usr.sbin/cpucontrol/cpucontrol.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/usr.sbin/cpucontrol/cpucontrol.c
==============================================================================
--- stable/11/usr.sbin/cpucontrol/cpucontrol.c Sat Oct 7 01:20:30 2017 (r324379)
+++ stable/11/usr.sbin/cpucontrol/cpucontrol.c Sat Oct 7 08:42:36 2017 (r324380)
@@ -60,6 +60,7 @@ int verbosity_level = 0;
#define FLAG_I 0x01
#define FLAG_M 0x02
#define FLAG_U 0x04
+#define FLAG_N 0x08
#define OP_INVAL 0x00
#define OP_READ 0x01
@@ -427,11 +428,7 @@ main(int argc, char *argv[])
error = 0;
cmdarg = ""; /* To keep gcc3 happy. */
- /*
- * Add all default data dirs to the list first.
- */
- datadir_add(DEFAULT_DATADIR);
- while ((c = getopt(argc, argv, "d:hi:m:uv")) != -1) {
+ while ((c = getopt(argc, argv, "d:hi:m:nuv")) != -1) {
switch (c) {
case 'd':
datadir_add(optarg);
@@ -444,6 +441,9 @@ main(int argc, char *argv[])
flags |= FLAG_M;
cmdarg = optarg;
break;
+ case 'n':
+ flags |= FLAG_N;
+ break;
case 'u':
flags |= FLAG_U;
break;
@@ -463,6 +463,8 @@ main(int argc, char *argv[])
usage();
/* NOTREACHED */
}
+ if ((flags & FLAG_N) == 0)
+ datadir_add(DEFAULT_DATADIR);
dev = argv[0];
c = flags & (FLAG_I | FLAG_M | FLAG_U);
switch (c) {
More information about the svn-src-all
mailing list