From nobody Thu Oct 30 23:52:32 2025 X-Original-To: dev-commits-src-branches@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 4cyLWj16Z8z6FnHr; Thu, 30 Oct 2025 23:52:33 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cyLWh6KPsz3c93; Thu, 30 Oct 2025 23:52:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761868352; 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=Xv71/o24K2vqJrN9m/zKd3QKs0BrGhE66I8RN4n1y5I=; b=Vzi96GjaNHWzLm6SwQEqY/mqD13BfjW8hNireDxtm5+k1+Ofej2Am1nunIROrsgWJSYbiU F6Sk+0S9C3WZywYAE/1PUk30GbXpj3us25F0ebzrcym2hlfR4QhSO2XwRJ+IbiL7/AA79A E9xATEK2hUU4mfR/p5RS9k60T5GUXSI8wHbVnPyezFuZH1AppwgFRxq25JBm23TPBUl0uE FZW0nTKJ26tvCALE36rMa/JhZz6GNfm9n96urAJ+vZzhGnt98v/te6+kHaFKhG9/z10p1q a8BffvSyNEtKmUQqdhsBal0Ku90o/P7SQk1kwqaBUdkbMdrLUM6yc8smj7+llQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1761868352; 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=Xv71/o24K2vqJrN9m/zKd3QKs0BrGhE66I8RN4n1y5I=; b=mr5Qank/3RrZ1xgyNQ7T+sb5zsBSW2bkpYuT3pG2C+k6RKxUY5/09K+BzPFNRAoZEZ/Dpg eUxQuF2t5WLGizuYgKTCZUqw/sHcg7fecypLK/W/GW5Mfq47Kgp26KasIQBaPj/5+CJP2b gPqu8Q7rN0nNcUkstkWzlKZrKvAuP6UKXSVGa1iQuWHspNqE2E8ba8ZhJ/L6JXOdMTESFh NRNJxfbkFtq4uv+BlFX5aYu6U0JdQ6gX5OotIPR+7I4fb3+2fMnelDWJQ/kA3yPQ5x3Hgx arvl/mtXMYDSLAmD+TphPnhJs7Dm8RfcxMBEwq1kupYIKpqU6SCrByGeQJIliQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1761868352; a=rsa-sha256; cv=none; b=kzS0e0depB84s2jN7sNa6g6H61zKMJ58TIMXFgTbs6szqgDNZppYA/kkEzTcYWLy3yUdG0 zq+rYWNuRUKNxRHJJc4ZZ76fRsmTvdtuOFXC/UxYAo46xFhMTUNRj0oWsjY3BAkDRIx6Q7 fs3GTqD+YwsG3yi9XsYfUgY8Qe/E46cD4+GpWTb30NIFH9N+bZgevnfoQBggtjeU89BJmz ORAPlvBc4VzFbJQiiTqAIAiaPpHB6Oq/KK9MHiM3EpvF5soSy+p+lxFGCCyvUXKrlpwtOG qwN/eNiYHeO6JjCaFooxmmz2SWYuAHumhl3odnPKvB/jd/VAciaqh0n9fBgBEw== 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 4cyLWh5sYtzlNF; Thu, 30 Oct 2025 23:52:32 +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 59UNqWYL088294; Thu, 30 Oct 2025 23:52:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 59UNqWJe088291; Thu, 30 Oct 2025 23:52:32 GMT (envelope-from git) Date: Thu, 30 Oct 2025 23:52:32 GMT Message-Id: <202510302352.59UNqWJe088291@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Colin Percival Subject: git: dedf7401bddf - releng/15.0 - quot: Drop the COMPAT version List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/releng/15.0 X-Git-Reftype: branch X-Git-Commit: dedf7401bddff47fc9ef76f8a4460e04e96f67f8 Auto-Submitted: auto-generated The branch releng/15.0 has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=dedf7401bddff47fc9ef76f8a4460e04e96f67f8 commit dedf7401bddff47fc9ef76f8a4460e04e96f67f8 Author: Dag-Erling Smørgrav AuthorDate: 2025-10-17 11:55:03 +0000 Commit: Colin Percival CommitDate: 2025-10-30 23:48:38 +0000 quot: Drop the COMPAT version We've had this code for 30 years, but there has never been a way to build it. We have no idea if it still works, or if it ever worked. Approved by: re (cperciva) Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D53131 (cherry picked from commit 0eaca4a24b97c02685532f86c121a4cf415942c5) (cherry picked from commit 9a7b48fef15230740cdf7b69e40e6ceb2bd2318e) --- usr.sbin/quot/quot.c | 54 ---------------------------------------------------- 1 file changed, 54 deletions(-) diff --git a/usr.sbin/quot/quot.c b/usr.sbin/quot/quot.c index 0a3e3094d940..ad9f65c94877 100644 --- a/usr.sbin/quot/quot.c +++ b/usr.sbin/quot/quot.c @@ -88,11 +88,7 @@ static void quot(char *, char *); * Due to the size of modern disks, we must cast intermediate * values to 64 bits to prevent potential overflows. */ -#ifdef COMPAT -#define SIZE(n) (n) -#else #define SIZE(n) ((int)(((intmax_t)(n) * 512 + blocksize - 1) / blocksize)) -#endif #define INOCNT(fs) ((fs)->fs_ipg) #define INOSZ(fs) \ @@ -153,27 +149,13 @@ get_inode(int fd, struct fs *super, ino_t ino) return ((union dinode *)di2); } -#ifdef COMPAT -#define actualblocks(fs, dp) (DIP(fs, dp, di_blocks) / 2) -#else #define actualblocks(fs, dp) DIP(fs, dp, di_blocks) -#endif static int virtualblocks(struct fs *super, union dinode *dp) { off_t nblk, sz; sz = DIP(super, dp, di_size); -#ifdef COMPAT - if (lblkno(super, sz) >= UFS_NDADDR) { - nblk = blkroundup(super, sz); - if (sz == nblk) - nblk += super->fs_bsize; - } - - return sz / 1024; - -#else /* COMPAT */ if (lblkno(super, sz) >= UFS_NDADDR) { nblk = blkroundup(super, sz); @@ -188,15 +170,11 @@ static int virtualblocks(struct fs *super, union dinode *dp) nblk = fragroundup(super, sz); return nblk / 512; -#endif /* COMPAT */ } static int isfree(struct fs *super, union dinode *dp) { -#ifdef COMPAT - return (DIP(super, dp, di_mode) & IFMT) == 0; -#else /* COMPAT */ switch (DIP(super, dp, di_mode) & IFMT) { case IFIFO: @@ -213,7 +191,6 @@ isfree(struct fs *super, union dinode *dp) default: errx(1, "unknown IFMT 0%o", DIP(super, dp, di_mode) & IFMT); } -#endif } static struct user { @@ -324,11 +301,7 @@ uses(uid_t uid, daddr_t blks, time_t act) usr->spc30 += blks; } -#ifdef COMPAT -#define FSZCNT 500 -#else #define FSZCNT 512 -#endif static struct fsizes { struct fsizes *fsz_next; daddr_t fsz_first, fsz_last; @@ -360,30 +333,12 @@ dofsizes(int fd, struct fs *super) int i; maxino = super->fs_ncg * super->fs_ipg - 1; -#ifdef COMPAT - if (!(fsizes = (struct fsizes *)malloc(sizeof(struct fsizes)))) - errx(1, "allocate fsize structure"); -#endif /* COMPAT */ for (inode = 0; inode < maxino; inode++) { if ((dp = get_inode(fd, super, inode)) != NULL && -#ifdef COMPAT - ((DIP(super, dp, di_mode) & IFMT) == IFREG || - (DIP(super, dp, di_mode) & IFMT) == IFDIR) -#else /* COMPAT */ !isfree(super, dp) -#endif /* COMPAT */ ) { sz = estimate ? virtualblocks(super, dp) : actualblocks(super, dp); -#ifdef COMPAT - if (sz >= FSZCNT) { - fsizes->fsz_count[FSZCNT-1]++; - fsizes->fsz_sz[FSZCNT-1] += sz; - } else { - fsizes->fsz_count[sz]++; - fsizes->fsz_sz[sz] += sz; - } -#else /* COMPAT */ ksz = SIZE(sz); for (fsp = &fsizes; (fp = *fsp); fsp = &fp->fsz_next) { if (ksz < fp->fsz_last) @@ -403,7 +358,6 @@ dofsizes(int fd, struct fs *super) } fp->fsz_count[ksz % FSZCNT]++; fp->fsz_sz[ksz % FSZCNT] += sz; -#endif /* COMPAT */ } } sz = 0; @@ -500,11 +454,7 @@ donames(int fd, struct fs *super) static void usage(void) { -#ifdef COMPAT - fprintf(stderr, "usage: quot [-cfhnv] [-a | filesystem ...]\n"); -#else /* COMPAT */ fprintf(stderr, "usage: quot [-cfhknv] [-a | filesystem ...]\n"); -#endif /* COMPAT */ exit(1); } @@ -551,9 +501,7 @@ main(int argc, char *argv[]) int ch, cnt; func = douser; -#ifndef COMPAT header = getbsize(&headerlen, &blocksize); -#endif while ((ch = getopt(argc, argv, "acfhknv")) != -1) { switch (ch) { case 'a': @@ -568,11 +516,9 @@ main(int argc, char *argv[]) case 'h': estimate = true; break; -#ifndef COMPAT case 'k': blocksize = 1024; break; -#endif /* COMPAT */ case 'n': func = donames; break;