From owner-dev-commits-src-main@freebsd.org Tue Jul 27 18:18:23 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A1044666635; Tue, 27 Jul 2021 18:18:23 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GZ4mH45lsz4sW4; Tue, 27 Jul 2021 18:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 7468776E7; Tue, 27 Jul 2021 18:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16RIIN2u091415; Tue, 27 Jul 2021 18:18:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16RIIN9v091414; Tue, 27 Jul 2021 18:18:23 GMT (envelope-from git) Date: Tue, 27 Jul 2021 18:18:23 GMT Message-Id: <202107271818.16RIIN9v091414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 674400eb20b6 - main - ftpd: delete dead code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: asomers X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 674400eb20b65369a88b1cb778d729bc297832c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jul 2021 18:18:23 -0000 The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=674400eb20b65369a88b1cb778d729bc297832c9 commit 674400eb20b65369a88b1cb778d729bc297832c9 Author: Alan Somers AuthorDate: 2021-07-27 18:14:00 +0000 Commit: Alan Somers CommitDate: 2021-07-27 18:18:08 +0000 ftpd: delete dead code Delete code killed by SVN r13139 in 1996. Little chance that it would still compile today. PR: 257317 Reported by: Alan Shearer MFC after: 2 weeks Sponsored by: Axcient --- libexec/ftpd/extern.h | 3 --- libexec/ftpd/ftpd.c | 49 ------------------------------------------------- 2 files changed, 52 deletions(-) diff --git a/libexec/ftpd/extern.h b/libexec/ftpd/extern.h index 80d24b46d2e4..aa48ea67e320 100644 --- a/libexec/ftpd/extern.h +++ b/libexec/ftpd/extern.h @@ -59,9 +59,6 @@ char *renamefrom(char *); void reply(int, const char *, ...) __printflike(2, 3); void retrieve(char *, char *); void send_file_list(char *); -#ifdef OLD_SETPROCTITLE -void setproctitle(const char *, ...); -#endif void statcmd(void); void statfilecmd(char *); void store(char *, char *, int); diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 25ae3fba956b..e23c06aaf143 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -205,10 +205,6 @@ int swaitmax = SWAITMAX; int swaitint = SWAITINT; #ifdef SETPROCTITLE -#ifdef OLD_SETPROCTITLE -char **Argv = NULL; /* pointer to argument vector */ -char *LastArgv = NULL; /* end of argv */ -#endif /* OLD_SETPROCTITLE */ char proctitle[LINE_MAX]; /* initial part of title */ #endif /* SETPROCTITLE */ @@ -280,16 +276,6 @@ main(int argc, char *argv[], char **envp) sigemptyset(&sa.sa_mask); sa.sa_flags = SA_RESTART; -#ifdef OLD_SETPROCTITLE - /* - * Save start and extent of argv for setproctitle. - */ - Argv = argv; - while (*envp) - envp++; - LastArgv = envp[-1] + strlen(envp[-1]); -#endif /* OLD_SETPROCTITLE */ - /* * Prevent diagnostic messages from appearing on stderr. * We run as a daemon or from inetd; in both cases, there's @@ -3329,41 +3315,6 @@ reapchild(int signo) while (waitpid(-1, NULL, WNOHANG) > 0); } -#ifdef OLD_SETPROCTITLE -/* - * Clobber argv so ps will show what we're doing. (Stolen from sendmail.) - * Warning, since this is usually started from inetd.conf, it often doesn't - * have much of an environment or arglist to overwrite. - */ -void -setproctitle(const char *fmt, ...) -{ - int i; - va_list ap; - char *p, *bp, ch; - char buf[LINE_MAX]; - - va_start(ap, fmt); - (void)vsnprintf(buf, sizeof(buf), fmt, ap); - - /* make ps print our process name */ - p = Argv[0]; - *p++ = '-'; - - i = strlen(buf); - if (i > LastArgv - p - 2) { - i = LastArgv - p - 2; - buf[i] = '\0'; - } - bp = buf; - while (ch = *bp++) - if (ch != '\n' && ch != '\r') - *p++ = ch; - while (p < LastArgv) - *p++ = ' '; -} -#endif /* OLD_SETPROCTITLE */ - static void appendf(char **strp, char *fmt, ...) {