Module Name:    src
Committed By:   mrg
Date:           Thu May 29 07:47:45 UTC 2014

Modified Files:
        src/usr.bin/config: config.5 gram.y sem.c

Log Message:
implement "no ident".


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.bin/config/config.5
cvs rdiff -u -r1.38 -r1.39 src/usr.bin/config/gram.y
cvs rdiff -u -r1.42 -r1.43 src/usr.bin/config/sem.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/config/config.5
diff -u src/usr.bin/config/config.5:1.22 src/usr.bin/config/config.5:1.23
--- src/usr.bin/config/config.5:1.22	Thu Feb 13 22:36:28 2014
+++ src/usr.bin/config/config.5	Thu May 29 07:47:45 2014
@@ -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 @@ prefix
 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.

Index: src/usr.bin/config/gram.y
diff -u src/usr.bin/config/gram.y:1.38 src/usr.bin/config/gram.y:1.39
--- src/usr.bin/config/gram.y:1.38	Sun Aug 11 10:37:08 2013
+++ src/usr.bin/config/gram.y	Thu May 29 07:47:45 2014
@@ -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 @@ config_item:
 	| 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); }

Index: src/usr.bin/config/sem.c
diff -u src/usr.bin/config/sem.c:1.42 src/usr.bin/config/sem.c:1.43
--- src/usr.bin/config/sem.c:1.42	Sun Aug 11 10:37:08 2013
+++ src/usr.bin/config/sem.c	Thu May 29 07:47:45 2014
@@ -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 @@ void
 setident(const char *i)
 {
 
-	ident = intern(i);
+	if (i)
+		ident = intern(i);
+	else
+		ident = NULL;
 }
 
 /*

Reply via email to