Module Name: src
Committed By: kre
Date: Mon Jul 24 13:36:15 UTC 2017
Modified Files:
src/bin/sh: var.c
Log Message:
NFC: DEBUG mode only change - add a little more tracing.
To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/bin/sh/var.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/sh/var.c
diff -u src/bin/sh/var.c:1.65 src/bin/sh/var.c:1.66
--- src/bin/sh/var.c:1.65 Wed Jul 12 19:06:16 2017
+++ src/bin/sh/var.c Mon Jul 24 13:36:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: var.c,v 1.65 2017/07/12 19:06:16 kre Exp $ */
+/* $NetBSD: var.c,v 1.66 2017/07/24 13:36:15 kre Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 5/4/95";
#else
-__RCSID("$NetBSD: var.c,v 1.65 2017/07/12 19:06:16 kre Exp $");
+__RCSID("$NetBSD: var.c,v 1.66 2017/07/24 13:36:15 kre Exp $");
#endif
#endif /* not lint */
@@ -422,10 +422,13 @@ setvareq(char *s, int flags)
struct var *vp, **vpp;
int nlen;
+ VTRACE(DBG_VARS, ("setvareq([%s],%#x) aflag=%d ", s, flags, aflag));
if (aflag && !(flags & VNOEXPORT))
flags |= VEXPORT;
vp = find_var(s, &vpp, &nlen);
if (vp != NULL) {
+ VTRACE(DBG_VARS, ("was [%s] fl:%#x\n", vp->text,
+ vp->flags));
if (vp->flags & VREADONLY) {
if ((flags & (VTEXTFIXED|VSTACK)) == 0)
ckfree(s);
@@ -465,6 +468,7 @@ setvareq(char *s, int flags)
INTON;
return;
}
+ VTRACE(DBG_VARS, ("new\n"));
/* not found */
if (flags & VNOSET) {
if ((flags & (VTEXTFIXED|VSTACK)) == 0)