Date: Fri, 16 Dec 2011 19:39:50 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r228592 - head/libexec/ypxfr Message-ID: <201112161939.pBGJdomr024015@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Fri Dec 16 19:39:49 2011 New Revision: 228592 URL: http://svn.freebsd.org/changeset/base/228592 Log: Attempt to fix the numerous incompatible enum conversions in libexec/ypxfr in the least disruptive way. MFC after: 1 week Modified: head/libexec/ypxfr/yp_dbwrite.c head/libexec/ypxfr/ypxfr_extern.h head/libexec/ypxfr/ypxfr_getmap.c head/libexec/ypxfr/ypxfr_main.c Modified: head/libexec/ypxfr/yp_dbwrite.c ============================================================================== --- head/libexec/ypxfr/yp_dbwrite.c Fri Dec 16 19:38:31 2011 (r228591) +++ head/libexec/ypxfr/yp_dbwrite.c Fri Dec 16 19:39:49 2011 (r228592) @@ -58,10 +58,10 @@ yp_open_db_rw(const char *domain, const char buf[1025]; - yp_errno = YP_TRUE; + yp_errno = YPXFR_SUCC; if (map[0] == '.' || strchr(map, '/')) { - yp_errno = YP_BADARGS; + yp_errno = YPXFR_BADARGS; return (NULL); } @@ -73,13 +73,13 @@ yp_open_db_rw(const char *domain, const if (dbp == NULL) { switch (errno) { case ENOENT: - yp_errno = YP_NOMAP; + yp_errno = YPXFR_NOMAP; break; case EFTYPE: - yp_errno = YP_BADDB; + yp_errno = YPXFR_MADDR; break; default: - yp_errno = YP_YPERR; + yp_errno = YPXFR_YPERR; break; } } Modified: head/libexec/ypxfr/ypxfr_extern.h ============================================================================== --- head/libexec/ypxfr/ypxfr_extern.h Fri Dec 16 19:38:31 2011 (r228591) +++ head/libexec/ypxfr/ypxfr_extern.h Fri Dec 16 19:39:49 2011 (r228592) @@ -46,7 +46,7 @@ extern BTREEINFO openinfo_b; extern char *yp_dir; extern int debug; -extern enum ypstat yp_errno; +extern ypxfrstat yp_errno; extern void yp_error(const char *, ...); extern int _yp_check(char **); extern const char *ypxfrerr_string(ypxfrstat); Modified: head/libexec/ypxfr/ypxfr_getmap.c ============================================================================== --- head/libexec/ypxfr/ypxfr_getmap.c Fri Dec 16 19:38:31 2011 (r228591) +++ head/libexec/ypxfr/ypxfr_getmap.c Fri Dec 16 19:39:49 2011 (r228592) @@ -46,7 +46,6 @@ extern bool_t xdr_ypresp_all_seq(XDR *, int (*ypresp_allfn)(); void *ypresp_data; extern DB *specdbp; -extern enum ypstat yp_errno; /* * This is largely the same as yp_all() except we do the transfer Modified: head/libexec/ypxfr/ypxfr_main.c ============================================================================== --- head/libexec/ypxfr/ypxfr_main.c Fri Dec 16 19:38:31 2011 (r228591) +++ head/libexec/ypxfr/ypxfr_main.c Fri Dec 16 19:39:49 2011 (r228592) @@ -88,7 +88,7 @@ ypxfr_exit(ypxfrstat retval, char *temp) exit(1); } - ypxfr_resp.status = retval; + ypxfr_resp.status = (yppush_status)retval; if (yppushproc_xfrresp_1(&ypxfr_resp, clnt) == NULL) { yp_error("%s", clnt_sperror(clnt, "callback failed"));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201112161939.pBGJdomr024015>