svn commit: r203688 - in head: bin/pkill bin/ps usr.bin/w
Bruce Cran
brucec at FreeBSD.org
Mon Feb 8 21:23:49 UTC 2010
Author: brucec
Date: Mon Feb 8 21:23:48 2010
New Revision: 203688
URL: http://svn.freebsd.org/changeset/base/203688
Log:
Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows the -M option to be used without specifying -N.
PR: bin/138146
Approved by: rrs (mentor)
MFC after: 3 days
Modified:
head/bin/pkill/pkill.c
head/bin/ps/ps.c
head/usr.bin/w/w.c
Modified: head/bin/pkill/pkill.c
==============================================================================
--- head/bin/pkill/pkill.c Mon Feb 8 21:01:41 2010 (r203687)
+++ head/bin/pkill/pkill.c Mon Feb 8 21:23:48 2010 (r203688)
@@ -180,7 +180,8 @@ main(int argc, char **argv)
debug_opt = 0;
pidfile = NULL;
pidfilelock = 0;
- execf = coref = _PATH_DEVNULL;
+ execf = NULL;
+ coref = _PATH_DEVNULL;
while ((ch = getopt(argc, argv, "DF:G:ILM:N:P:SU:ad:fg:ij:lnos:t:u:vx")) != -1)
switch (ch) {
Modified: head/bin/ps/ps.c
==============================================================================
--- head/bin/ps/ps.c Mon Feb 8 21:01:41 2010 (r203687)
+++ head/bin/ps/ps.c Mon Feb 8 21:23:48 2010 (r203688)
@@ -212,7 +212,8 @@ main(int argc, char *argv[])
init_list(&sesslist, addelem_pid, sizeof(pid_t), "session id");
init_list(&ttylist, addelem_tty, sizeof(dev_t), "tty");
init_list(&uidlist, addelem_uid, sizeof(uid_t), "user");
- memf = nlistf = _PATH_DEVNULL;
+ memf = _PATH_DEVNULL;
+ nlistf = NULL;
while ((ch = getopt(argc, argv, PS_ARGS)) != -1)
switch (ch) {
case 'A':
Modified: head/usr.bin/w/w.c
==============================================================================
--- head/usr.bin/w/w.c Mon Feb 8 21:01:41 2010 (r203687)
+++ head/usr.bin/w/w.c Mon Feb 8 21:23:48 2010 (r203688)
@@ -158,7 +158,8 @@ main(int argc, char *argv[])
}
dropgid = 0;
- memf = nlistf = _PATH_DEVNULL;
+ memf = _PATH_DEVNULL;
+ nlistf = NULL;
while ((ch = getopt(argc, argv, p)) != -1)
switch (ch) {
case 'd':
More information about the svn-src-head
mailing list