- If error string begins with "warning: ", don't exit, treat it as a warning

only.
- Use getprogname() function when informing about versions problem.
This commit is contained in:
Pawel Jakub Dawidek 2004-08-28 02:29:40 +00:00
parent 16ebaa0793
commit f792f1d865
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134419

View File

@ -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) {