- Add warnings support. - Fix command name printing in case of version desynch. diff -ru core/geom.c /usr/src/sbin/geom/core/geom.c --- core/geom.c Mon Aug 2 11:05:29 2004 +++ sbin/geom/core/geom.c Sat Aug 28 04:29:40 2004 @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sbin/geom/core/geom.c,v 1.6 2004/08/02 09:05:29 pjd Exp $"); +__FBSDID("$FreeBSD: src/sbin/geom/core/geom.c,v 1.7 2004/08/28 02:29:40 pjd Exp $"); #include #include @@ -420,8 +420,10 @@ } 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 @@ } 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) {