PERFORCE change 176121 for review

Garrett Cooper gcooper at FreeBSD.org
Fri Mar 26 05:05:00 UTC 2010


http://p4web.freebsd.org/chv.cgi?CH=176121

Change 176121 by gcooper at gcooper-bayonetta on 2010/03/26 05:04:11

	Add progname to pkg_updating for consistency, as this is required the more pervasive customized messages become in libinstall.

Affected files ...

.. //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/updating/main.c#2 edit

Differences ...

==== //depot/projects/soc2007/gcooper-pkg_install-enhancements-simplified/usr.sbin/pkg_install/updating/main.c#2 (text+ko) ====

@@ -37,6 +37,8 @@
 	{ NULL,		0,			NULL,		0 },
 };
 
+char	*progname	= NULL;
+
 /*
  * Parse /usr/port/UPDATING for corresponding entries. If no argument is
  * passed to pkg_updating all entries for all installed ports are displayed.
@@ -87,6 +89,9 @@
 	DIR *dir;
 	FILE *fd;
 
+	if ((progname = basename(argv[0])) == NULL)
+		err(EXIT_FAILURE, "basename");
+
 	while ((ch = getopt_long(argc, argv, opts, longopts, NULL)) != -1) {
 		switch (ch) {
 			case 'd':


More information about the p4-projects mailing list