Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Mar 2010 05:04:59 GMT
From:      Garrett Cooper <gcooper@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 176121 for review
Message-ID:  <201003260504.o2Q54xs3058387@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=176121

Change 176121 by gcooper@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':



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003260504.o2Q54xs3058387>