From owner-svn-src-stable-9@FreeBSD.ORG Sat Dec 31 19:46:07 2011 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1EA00106566C; Sat, 31 Dec 2011 19:46:07 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07B2E8FC08; Sat, 31 Dec 2011 19:46:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBVJk6pr079895; Sat, 31 Dec 2011 19:46:06 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBVJk6uO079891; Sat, 31 Dec 2011 19:46:06 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201112311946.pBVJk6uO079891@svn.freebsd.org> From: Dimitry Andric Date: Sat, 31 Dec 2011 19:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r229142 - stable/9/libexec/ypxfr X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 31 Dec 2011 19:46:07 -0000 Author: dim Date: Sat Dec 31 19:46:06 2011 New Revision: 229142 URL: http://svn.freebsd.org/changeset/base/229142 Log: MFC r228600: Fix the incompatible enum conversions in libexec/ypxfr in another, more messy way, so as to not disrupt other yp programs: just add casts to convert the incompatible enums, as the numerical values are the same (either by accident, design, or the phase of the moon at that time). Modified: stable/9/libexec/ypxfr/ypxfr_getmap.c stable/9/libexec/ypxfr/ypxfr_main.c stable/9/libexec/ypxfr/ypxfr_misc.c Directory Properties: stable/9/libexec/ypxfr/ (props changed) Modified: stable/9/libexec/ypxfr/ypxfr_getmap.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_getmap.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_getmap.c Sat Dec 31 19:46:06 2011 (r229142) @@ -73,7 +73,7 @@ ypxfr_get_map(char *map, char *domain, c if ((clnt = clnt_create(host, YPPROG, YPVERS, "tcp")) == NULL) { yp_error("%s", clnt_spcreateerror("failed to \ create tcp handle")); - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; return(1); } @@ -91,7 +91,7 @@ create tcp handle")); return(0); if (status != YP_TRUE) { - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; return(1); } Modified: stable/9/libexec/ypxfr/ypxfr_main.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_main.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_main.c Sat Dec 31 19:46:06 2011 (r229142) @@ -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")); @@ -329,7 +329,7 @@ the local domain name isn't set"); ypxfr_use_yplib)) == NULL) { yp_error("failed to find master of %s in domain %s: %s", ypxfr_mapname, ypxfr_source_domain, - ypxfrerr_string(yp_errno)); + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_MADDR,NULL); } } @@ -358,7 +358,8 @@ the local domain name isn't set"); ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? - "map has order 0" : ypxfrerr_string(yp_errno)); + "map has order 0" : + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,NULL); } @@ -533,7 +534,8 @@ leave: ypxfr_master, 0)) == 0) { yp_error("failed to get order number of %s: %s", ypxfr_mapname, yp_errno == YPXFR_SUCC ? - "map has order 0" : ypxfrerr_string(yp_errno)); + "map has order 0" : + ypxfrerr_string((ypxfrstat)yp_errno)); ypxfr_exit(YPXFR_YPERR,ypxfr_temp_map); } Modified: stable/9/libexec/ypxfr/ypxfr_misc.c ============================================================================== --- stable/9/libexec/ypxfr/ypxfr_misc.c Sat Dec 31 19:42:52 2011 (r229141) +++ stable/9/libexec/ypxfr/ypxfr_misc.c Sat Dec 31 19:46:06 2011 (r229142) @@ -130,14 +130,14 @@ ypxfr_get_master(char *domain, char *map if ((res = yp_master(domain, map, &master))) { switch (res) { case YPERR_DOMAIN: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YPERR_MAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YPERR_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(NULL); @@ -154,7 +154,7 @@ ypxfr_get_master(char *domain, char *map if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) { yp_error("%s",clnt_spcreateerror("failed to \ create udp handle to ypserv")); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(NULL); } @@ -164,21 +164,21 @@ create udp handle to ypserv")); yp_error("%s",clnt_sperror(clnt,"YPPROC_MASTER \ failed")); clnt_destroy(clnt); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(NULL); } clnt_destroy(clnt); if (resp->stat != YP_TRUE) { switch (resp->stat) { case YP_NODOM: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YP_NOMAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YP_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(NULL); @@ -198,14 +198,14 @@ ypxfr_get_order(char *domain, char *map, if ((res = yp_order(domain, map, &order))) { switch (res) { case YPERR_DOMAIN: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YPERR_MAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YPERR_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(0); @@ -219,7 +219,7 @@ ypxfr_get_order(char *domain, char *map, if ((clnt = clnt_create(source,YPPROG,YPVERS,"udp")) == NULL) { yp_error("%s",clnt_spcreateerror("couldn't create \ udp handle to ypserv")); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(0); } req.map = map; @@ -228,21 +228,21 @@ udp handle to ypserv")); yp_error("%s", clnt_sperror(clnt, "YPPROC_ORDER \ failed")); clnt_destroy(clnt); - yp_errno = YPXFR_RPC; + yp_errno = (enum ypstat)YPXFR_RPC; return(0); } clnt_destroy(clnt); if (resp->stat != YP_TRUE) { switch (resp->stat) { case YP_NODOM: - yp_errno = YPXFR_NODOM; + yp_errno = (enum ypstat)YPXFR_NODOM; break; case YP_NOMAP: - yp_errno = YPXFR_NOMAP; + yp_errno = (enum ypstat)YPXFR_NOMAP; break; case YP_YPERR: default: - yp_errno = YPXFR_YPERR; + yp_errno = (enum ypstat)YPXFR_YPERR; break; } return(0);