diff options
author | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-08-28 02:29:40 +0000 |
---|---|---|
committer | Pawel Jakub Dawidek <pjd@FreeBSD.org> | 2004-08-28 02:29:40 +0000 |
commit | f792f1d8650e4925fe84d0f96f6df90d7ea89abc (patch) | |
tree | 0afb505642caee1047f06ba42f0f1e12a1d1b94d /sbin/geom/core | |
parent | 16ebaa079377012a02923da486fbe9fa0f719f45 (diff) | |
download | src-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/geom/core')
-rw-r--r-- | sbin/geom/core/geom.c | 10 |
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) { |