Date: Thu, 6 Jul 2006 13:38:48 GMT From: Paolo Pisati <piso@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100750 for review Message-ID: <200607061338.k66DcmEe084803@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100750 Change 100750 by piso@piso_newluxor on 2006/07/06 13:38:32 Better return code. Affected files ... .. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#6 edit Differences ... ==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.c#6 (text+ko) ==== @@ -1523,18 +1523,16 @@ const char *error; moduledata_t *p; - // XXX - mixing my own error code and errno.h is really - // a bad idea, convert everything to use errno.h handle = dlopen (path, RTLD_LAZY); if (!handle) { fputs (dlerror(), stderr); - return (-1); + return (EINVAL); } p = dlsym(handle, "alias_mod"); if ((error = dlerror()) != NULL) { fputs(error, stderr); - return (-1); + return (EINVAL); } t = malloc(sizeof(struct dll)); @@ -1545,13 +1543,13 @@ if (attach_dll(t) == EEXIST) { free(t); fputs("dll conflict", stderr); - return (-1); + return (EEXIST); } m = dlsym(t->handle, "handlers"); if ((error = dlerror()) != NULL) { fputs(error, stderr); - return (-1); + return (EINVAL); } attach_handlers(m);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607061338.k66DcmEe084803>