aboutsummaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorPawel Jakub Dawidek <pjd@FreeBSD.org>2004-08-28 02:29:40 +0000
committerPawel Jakub Dawidek <pjd@FreeBSD.org>2004-08-28 02:29:40 +0000
commitf792f1d8650e4925fe84d0f96f6df90d7ea89abc (patch)
tree0afb505642caee1047f06ba42f0f1e12a1d1b94d /sbin
parent16ebaa079377012a02923da486fbe9fa0f719f45 (diff)
downloadsrc-f792f1d8650e4925fe84d0f96f6df90d7ea89abc.tar.gz
src-f792f1d8650e4925fe84d0f96f6df90d7ea89abc.zip
- If error string begins with "warning: ", don't exit, treat it as a warning
only. - Use getprogname() function when informing about versions problem.
Notes
Notes: svn path=/head/; revision=134419
Diffstat (limited to 'sbin')
-rw-r--r--sbin/geom/core/geom.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sbin/geom/core/geom.c b/sbin/geom/core/geom.c
index c32717966d32..a77af7e94cca 100644
--- a/sbin/geom/core/geom.c
+++ b/sbin/geom/core/geom.c
@@ -420,8 +420,10 @@ run_command(int argc, char *argv[])
}
if (errstr != NULL) {
fprintf(stderr, "%s\n", errstr);
- gctl_free(req);
- exit(EXIT_FAILURE);
+ if (strncmp(errstr, "warning: ", strlen("warning: ")) != 0) {
+ gctl_free(req);
+ exit(EXIT_FAILURE);
+ }
}
if (*buf != '\0')
printf("%s", buf);
@@ -460,8 +462,8 @@ load_library(void)
}
if (*lib_version != G_LIB_VERSION) {
dlclose(dlh);
- errx(EXIT_FAILURE, "%s and %s are not synchronized.", comm,
- path);
+ errx(EXIT_FAILURE, "%s and %s are not synchronized.",
+ getprogname(), path);
}
version = dlsym(dlh, "version");
if (version == NULL) {