diff options
author | pjd <pjd@FreeBSD.org> | 2004-08-28 02:29:40 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2004-08-28 02:29:40 +0000 |
commit | bf3acf8f031fada66ba872e0fc0e9d31e7979285 (patch) | |
tree | 0afb505642caee1047f06ba42f0f1e12a1d1b94d /sbin/geom/core | |
parent | f7c5bbc8f201bba4e621d88934f609bcafa0f848 (diff) | |
download | FreeBSD-src-bf3acf8f031fada66ba872e0fc0e9d31e7979285.zip FreeBSD-src-bf3acf8f031fada66ba872e0fc0e9d31e7979285.tar.gz |
- If error string begins with "warning: ", don't exit, treat it as a warning
only.
- Use getprogname() function when informing about versions problem.
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 c327179..a77af7e 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) { |