Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/config implement "no ident".



details:   https://anonhg.NetBSD.org/src/rev/61c8e1acd140
branches:  trunk
changeset: 796323:61c8e1acd140
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu May 29 07:47:45 2014 +0000

description:
implement "no ident".

diffstat:

 usr.bin/config/config.5 |  4 +++-
 usr.bin/config/gram.y   |  3 ++-
 usr.bin/config/sem.c    |  7 +++++--
 3 files changed, 10 insertions(+), 4 deletions(-)

diffs (57 lines):

diff -r cbab816cfcb9 -r 61c8e1acd140 usr.bin/config/config.5
--- a/usr.bin/config/config.5   Thu May 29 07:40:37 2014 +0000
+++ b/usr.bin/config/config.5   Thu May 29 07:47:45 2014 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: config.5,v 1.22 2014/02/13 22:36:28 wiz Exp $
+.\" $NetBSD: config.5,v 1.23 2014/05/29 07:47:45 mrg Exp $
 .\"
 .\"  Copyright (c) 2006, 2007 The NetBSD Foundation.
 .\"  All rights reserved.
@@ -587,6 +587,8 @@
 Defines the indentification string of the kernel.
 This statement is optional, and the name of the main configuration file will be
 used as a default value.
+.It Ic no ident
+Deletes any pre-existing indentification string of the kernel.
 .It Ic maxusers Ar number
 Despite its name, this statement does not limit the maximum number of users on
 the system.
diff -r cbab816cfcb9 -r 61c8e1acd140 usr.bin/config/gram.y
--- a/usr.bin/config/gram.y     Thu May 29 07:40:37 2014 +0000
+++ b/usr.bin/config/gram.y     Thu May 29 07:47:45 2014 +0000
@@ -1,5 +1,5 @@
 %{
-/*     $NetBSD: gram.y,v 1.38 2013/08/11 10:37:08 pooka Exp $  */
+/*     $NetBSD: gram.y,v 1.39 2014/05/29 07:47:45 mrg Exp $    */
 
 /*
  * Copyright (c) 1992, 1993
@@ -627,6 +627,7 @@
        | OPTIONS opt_list
        | MAXUSERS NUMBER               { setmaxusers($2.val); }
        | IDENT stringvalue             { setident($2); }
+       | NO IDENT                      { setident(NULL); }
        | CONFIG conf root_spec sysparam_list
                                        { addconf(&conf); }
        | NO CONFIG WORD                { delconf($3); }
diff -r cbab816cfcb9 -r 61c8e1acd140 usr.bin/config/sem.c
--- a/usr.bin/config/sem.c      Thu May 29 07:40:37 2014 +0000
+++ b/usr.bin/config/sem.c      Thu May 29 07:47:45 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sem.c,v 1.42 2013/08/11 10:37:08 pooka Exp $   */
+/*     $NetBSD: sem.c,v 1.43 2014/05/29 07:47:45 mrg Exp $     */
 
 /*
  * Copyright (c) 1992, 1993
@@ -181,7 +181,10 @@
 setident(const char *i)
 {
 
-       ident = intern(i);
+       if (i)
+               ident = intern(i);
+       else
+               ident = NULL;
 }
 
 /*



Home | Main Index | Thread Index | Old Index