diff options
author | wollman <wollman@FreeBSD.org> | 1995-11-28 20:29:58 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-11-28 20:29:58 +0000 |
commit | 27c5ca1e16ce4dc5fa210dae5eb6b2f1cacd6185 (patch) | |
tree | 20f22c3c84982408efbc4af63303b2ebe50bc86e /usr.sbin/config | |
parent | 5ad22f850a19ff8f5e2cb58794c14c206fadd295 (diff) | |
download | FreeBSD-src-27c5ca1e16ce4dc5fa210dae5eb6b2f1cacd6185.zip FreeBSD-src-27c5ca1e16ce4dc5fa210dae5eb6b2f1cacd6185.tar.gz |
If CONFIG_NO_CLOBBER_EVER is defined (e.g., in /etc/make.conf), don't make
it possible for config to ever blow away a work directory. Default behavior
remains broken.
Diffstat (limited to 'usr.sbin/config')
-rw-r--r-- | usr.sbin/config/Makefile | 3 | ||||
-rw-r--r-- | usr.sbin/config/main.c | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/usr.sbin/config/Makefile b/usr.sbin/config/Makefile index 4e4e4f4..36e3d17 100644 --- a/usr.sbin/config/Makefile +++ b/usr.sbin/config/Makefile @@ -8,5 +8,8 @@ MAN8= config.8 DPADD= ${LIBL} LDADD= -ll CLEANFILES+= config.c lang.c lex.yy.c y.tab.[ch] +.if defined(CONFIG_NO_CLOBBER_EVER) +CFLAGS+=-DNO_CLOBBER_EVER +.endif .include <bsd.prog.mk> diff --git a/usr.sbin/config/main.c b/usr.sbin/config/main.c index 6ca61cd..98d9bf7 100644 --- a/usr.sbin/config/main.c +++ b/usr.sbin/config/main.c @@ -116,6 +116,7 @@ usage: fputs("usage: config [-gpn] sysname\n", stderr); fprintf(stderr, "config: %s isn't a directory.\n", p); exit(2); } +#ifndef NO_CLOBBER_EVER else if (!no_config_clobber) { char tmp[strlen(p) + 8]; @@ -133,6 +134,7 @@ usage: fputs("usage: config [-gpn] sysname\n", stderr); exit(2); } } +#endif loadaddress = -1; dtab = NULL; confp = &conf_list; |