diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2001-04-08 16:45:49 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2001-04-08 16:45:49 +0000 |
commit | 5a14ac2a8fbdc64a6e5a1d31d891a4f0eee033d6 (patch) | |
tree | e31007d42dcc89fb9503a1c900c02a5f4ddcb019 /usr.sbin/pkg_install/lib/str.c | |
parent | 40d86c85d5851915c47abba5df4f515c693af109 (diff) |
Better error messages: pwarnx function, which works like pwarn, except
it shows a current package name along with the program name, e.g.,
pkg_add(foo-3.0): some error occurred.
A few messages now bear redundant pkgnames, which is much better than
doing pkg_add * and being informed that something went slightly wrong
somewhere...
Diffstat (limited to 'usr.sbin/pkg_install/lib/str.c')
-rw-r--r-- | usr.sbin/pkg_install/lib/str.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_install/lib/str.c b/usr.sbin/pkg_install/lib/str.c index 572add98089..ef12746d43a 100644 --- a/usr.sbin/pkg_install/lib/str.c +++ b/usr.sbin/pkg_install/lib/str.c @@ -1,7 +1,7 @@ -/* $OpenBSD: str.c,v 1.4 1998/10/13 23:09:54 marc Exp $ */ +/* $OpenBSD: str.c,v 1.5 2001/04/08 16:45:48 espie Exp $ */ #ifndef lint -static const char *rcsid = "$OpenBSD: str.c,v 1.4 1998/10/13 23:09:54 marc Exp $"; +static const char *rcsid = "$OpenBSD: str.c,v 1.5 2001/04/08 16:45:48 espie Exp $"; #endif /* @@ -204,7 +204,7 @@ alternate_match(const char *pattern, const char *pkg) } } if (cnt != 0) { - warnx("Malformed alternate `%s'", pattern); + pwarnx("Malformed alternate `%s'", pattern); return 1; } for (found = 0, cp = sep + 1; *sep != '}'; cp = sep + 1) { @@ -308,7 +308,7 @@ findmatchingname(const char *dir, const char *pattern, matchfn f, char *data) found = 0; if ((dirp = opendir(dir)) == NULL) { - /* warnx("can't opendir dir '%s'", dir); */ + /* pwarnx("can't opendir dir '%s'", dir); */ return -1; } while ((dp = readdir(dirp)) != NULL) { |