From nobody Thu Jan 09 04:04:58 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YTB563BMbz5kdrB; Thu, 09 Jan 2025 04:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YTB5614skz41ZK; Thu, 9 Jan 2025 04:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736395498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dBgUUv0FbyhiEawfwFik4OnXVNj2g7TKq4UcsjCKYys=; b=HCEhAo4j94wombGU33lj57GJ51XCVYmJqO6nQ5J3SMpiFa90v/1admfrQIeDX7B9n/A+HD DFc9OX65BE0f8cIV/oafUuKy4k004bbruKjEpPLVnWFBgLO3wLJCIW/91NqhQJCjTK1+Ez CEYWn5Zoc3uQmHTR/6dXjyp3DAKLXb9gMH+eXe7/W0dDWuCncmRUo6dDOxdSO2flLdcPSP 4qUv+vie5zI1kH8jnGZtnhL+hyCTkfv1fSOk6SJ6SA54QOx+sdduNjfrnl7bXHEW8cOqK7 MxvdSepuaN5AiHV+iRVCd2hd7G6qTKVzCsU+VWSLPXuJLZw+zMm2rvFWatPfCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1736395498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dBgUUv0FbyhiEawfwFik4OnXVNj2g7TKq4UcsjCKYys=; b=rRnA992vSTtGiq6Zwb2v1qqhju56FTVsCRB+qZv1wmz8X9DgRvUOE8qQIfI0DJZMsI+sqP dBZYLH7iGPE6KzTOLf7vsfgY6GdPZkldaj1sd5r9bECNZh2WlzEsFf92MAqLmAtFsJkFN4 dUnHA7xUYe2R9uWpGS+RgOjY+rV2na1MXCZqv8cEIbLNWYUOrFbumaW9rI68/VDmMAprKq ilJu6vRpmqXnuBFao/+TxJvQno42KThQ8e4SbrMhyqyBgpEIxjKMe+U/F2Z+vrM68aYD+u J3OAN2oVjK0uaWAXoXvdn9Kns6fBPzEWNcCfNXueiZ6GPnW9yBowwlSg7/zl2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1736395498; a=rsa-sha256; cv=none; b=uBi4jv5dq18DuVTtRgmN0vKmXuARovxf7fH4EF+c4h3cyZJnV4D/AY3OjknOvnRKNWRFDu cFLAEzh+20fSCLF/0mSYXc64zWcqU/mUbjuxa0v80HeN8fWdi5tFrxFuNdPiJH6DrhWMYL cCsTbE2+yTS1Kjd62wAc7Ke96pvLyi4TzZULp5FzZRM2fbB7fD6rfbkMH/NoLgf3oDv3Vi 8ndapxSZlUNP2s/GD3ofjylg6jC+fo6B2QBHprcY5jTvoNKv57C+imDzZzlfOoS3qN+Wt0 FQ4/7lSVuhlSODpAHlE8a1ke6bMsGUfne2IkNou9UcYJKTZuJIcNYLqW/DjNDQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YTB560hY2z1Pbq; Thu, 09 Jan 2025 04:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 50944wbI031271; Thu, 9 Jan 2025 04:04:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 50944wOs031268; Thu, 9 Jan 2025 04:04:58 GMT (envelope-from git) Date: Thu, 9 Jan 2025 04:04:58 GMT Message-Id: <202501090404.50944wOs031268@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ebb36fcaae4d - main - rpc: remove svc_create(), it is not used List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ebb36fcaae4dfd3720e43f8e6a9613e5d84227e0 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ebb36fcaae4dfd3720e43f8e6a9613e5d84227e0 commit ebb36fcaae4dfd3720e43f8e6a9613e5d84227e0 Author: Gleb Smirnoff AuthorDate: 2025-01-09 04:00:12 +0000 Commit: Gleb Smirnoff CommitDate: 2025-01-09 04:00:12 +0000 rpc: remove svc_create(), it is not used --- sys/rpc/svc.h | 13 ---------- sys/rpc/svc_generic.c | 70 --------------------------------------------------- 2 files changed, 83 deletions(-) diff --git a/sys/rpc/svc.h b/sys/rpc/svc.h index d8a8d0139cc4..92755a198488 100644 --- a/sys/rpc/svc.h +++ b/sys/rpc/svc.h @@ -578,19 +578,6 @@ extern void svcpool_destroy(SVCPOOL *pool); */ extern void svcpool_close(SVCPOOL *pool); -/* - * Transport independent svc_create routine. - */ -extern int svc_create(SVCPOOL *, void (*)(struct svc_req *, SVCXPRT *), - const rpcprog_t, const rpcvers_t, const char *); -/* - * void (*dispatch)(); -- dispatch routine - * const rpcprog_t prognum; -- program number - * const rpcvers_t versnum; -- version number - * const char *nettype; -- network type - */ - - /* * Generic server creation routine. It takes a netconfig structure * instead of a nettype. diff --git a/sys/rpc/svc_generic.c b/sys/rpc/svc_generic.c index 6fb43dc5c940..12c96eca27c8 100644 --- a/sys/rpc/svc_generic.c +++ b/sys/rpc/svc_generic.c @@ -64,76 +64,6 @@ extern int __svc_vc_setflag(SVCXPRT *, int); -/* - * The highest level interface for server creation. - * It tries for all the nettokens in that particular class of token - * and returns the number of handles it can create and/or find. - * - * It creates a link list of all the handles it could create. - * If svc_create() is called multiple times, it uses the handle - * created earlier instead of creating a new handle every time. - */ -int -svc_create( - SVCPOOL *pool, - void (*dispatch)(struct svc_req *, SVCXPRT *), - rpcprog_t prognum, /* Program number */ - rpcvers_t versnum, /* Version number */ - const char *nettype) /* Networktype token */ -{ - int g, num = 0; - SVCGROUP *grp; - SVCXPRT *xprt; - struct netconfig *nconf; - void *handle; - - if ((handle = __rpc_setconf(nettype)) == NULL) { - printf("svc_create: unknown protocol"); - return (0); - } - while ((nconf = __rpc_getconf(handle)) != NULL) { - for (g = 0; g < SVC_MAXGROUPS; g++) { - grp = &pool->sp_groups[g]; - mtx_lock(&grp->sg_lock); - TAILQ_FOREACH(xprt, &grp->sg_xlist, xp_link) { - if (strcmp(xprt->xp_netid, nconf->nc_netid)) - continue; - /* Found an old one, use it */ - mtx_unlock(&grp->sg_lock); - (void) rpcb_unset(prognum, versnum, nconf); - if (svc_reg(xprt, prognum, versnum, - dispatch, nconf) == FALSE) { - printf( - "svc_create: could not register prog %u vers %u on %s\n", - (unsigned)prognum, (unsigned)versnum, - nconf->nc_netid); - mtx_lock(&grp->sg_lock); - } else { - num++; - mtx_lock(&grp->sg_lock); - break; - } - } - mtx_unlock(&grp->sg_lock); - } - if (xprt == NULL) { - /* It was not found. Now create a new one */ - xprt = svc_tp_create(pool, dispatch, prognum, versnum, - NULL, nconf); - if (xprt) { - num++; - SVC_RELEASE(xprt); - } - } - } - __rpc_endconf(handle); - /* - * In case of num == 0; the error messages are generated by the - * underlying layers; and hence not needed here. - */ - return (num); -} - /* * The high level interface to svc_tli_create(). * It tries to create a server for "nconf" and registers the service