svn commit: r204289 - in stable/7: bin/ps usr.bin/pkill usr.bin/w

Bruce Cran brucec at FreeBSD.org
Wed Feb 24 21:57:51 UTC 2010


Author: brucec
Date: Wed Feb 24 21:57:51 2010
New Revision: 204289
URL: http://svn.freebsd.org/changeset/base/204289

Log:
  MFC r203688:
  
  Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows
  the -M option to be used without specifying -N.
  
  Approved by:	rrs (mentor)

Modified:
  stable/7/bin/ps/ps.c
  stable/7/usr.bin/pkill/pkill.c
  stable/7/usr.bin/w/w.c
Directory Properties:
  stable/7/bin/ps/   (props changed)
  stable/7/usr.bin/pkill/   (props changed)
  stable/7/usr.bin/w/   (props changed)

Modified: stable/7/bin/ps/ps.c
==============================================================================
--- stable/7/bin/ps/ps.c	Wed Feb 24 21:29:45 2010	(r204288)
+++ stable/7/bin/ps/ps.c	Wed Feb 24 21:57:51 2010	(r204289)
@@ -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 ((char)ch) {
 		case 'A':

Modified: stable/7/usr.bin/pkill/pkill.c
==============================================================================
--- stable/7/usr.bin/pkill/pkill.c	Wed Feb 24 21:29:45 2010	(r204288)
+++ stable/7/usr.bin/pkill/pkill.c	Wed Feb 24 21:57:51 2010	(r204289)
@@ -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: stable/7/usr.bin/w/w.c
==============================================================================
--- stable/7/usr.bin/w/w.c	Wed Feb 24 21:29:45 2010	(r204288)
+++ stable/7/usr.bin/w/w.c	Wed Feb 24 21:57:51 2010	(r204289)
@@ -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-all mailing list