From nobody Fri Nov 20 15:11:03 2026 X-Original-To: dev-commits-src-all@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 4jWJgq6K7Gz71yHn for ; Fri, 20 Nov 2026 15:11:03 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jWJgq3dW7z4jcq for ; Fri, 20 Nov 2026 15:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795187463; 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=cYc5LaU47JZXXvjdWguk/ISz/1Slo516h877ILxi574=; b=s91+jpABkEZ7QKWSOh3Q11L2lqUH+55lk9FR7o9C2q+oa0Y53gXqJX9HKOYdz/9i0ihDL2 VJgAhRXhf8a6VG7sO5vRWk9+Dd1w6VGj7+vA8Zk2qLQ/bjWWRjr5fK6Rk5LQzHwLri+PCx VnGfZqFjbVfyUZ14pc+1xI7JkD4k0oh+6YN10dR721Az7jHMrVNVWR3X9RJstZrvwbEmSa 5DfmEXiDPYpqTK+d9UMrUAZyWDV9XO7PqZ1c4nDmHqv+oE1mvUaS5RYJA5g9hDedyGEzb2 +a0TD86YX6pIXiSB4Ej47Imz05JHdc2DFDUr3mEXeCOaO171ZnYrlj5tXlCp+w== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795187463; b=N/xIivvOJBb5NlKpUsdqzxfe3M+IKYsADejtdw0uq6i3rS0i3o2jFwZqbl4aLCM6OvQuIR uM6CtfqYwlTxfckSVA1lH4UIrDlqUAOKOvI/uhzwMdV3n3CEsI//OmhVi7w85uHa1q0pue Z/Lo/f2ysQRoypL9akiYj5CQ5DT9rxYNQ26ATAT1hb+MSlaEZslvDRa9SILScuRp6myRdB JCGOj6iZ+zeXJBUB4tSDI+86UBA6erEKrsZRkG3CGuQd+h0PUpW6Cd1fFrkn6aWLzyTPaN n5TdhBnrzlUPIfZFSU6kv4kZun9jZ4HCI1xZYvhPbA6d1p2hFh+r12brxJ0X7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795187463; 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=cYc5LaU47JZXXvjdWguk/ISz/1Slo516h877ILxi574=; b=yV4wzhc00h4bHlnm3/KfeDh+P+fWdrLqK9Oo5eacTZtDCleQKGC+aVvzKJa+uhnKwLvBhw YZX3F5BzmWXjg8n5E8n7zErumyprdp/pUyJfb2lcIiUzYIaqmiqgHBHO5TSeWAAPqPxX4W OE+aEzhY744FSPkWp9LVmCTbzIlLSqpxo/Zq4QC/j25L1RWiXBaH5j3o6Du/aoo34Bt9Bv ye428YS1QUqOSj+1me5IRYLJFUp4e8zbOU+Ra664AUp5+kGu6FYoeSlURJL2GBJZMHxxHR IT2AGMm8Vtw71pDjz3Kqpf81LLZn5Kyj4zGLkPJQx43mU93VmawqRr0AwZRsBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jWJgq3Jg0ztPy for ; Fri, 20 Nov 2026 15:11:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18763 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 20 Nov 2026 15:11:03 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: face51fd9c82 - main - fstat(1), fuser(1): teach about altroot List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: face51fd9c8213f6f4133b0e137fcf22e4d1ab76 Auto-Submitted: auto-generated Date: Fri, 20 Nov 2026 15:11:03 +0000 Message-Id: <6b006307.18763.5fbbf25d@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=face51fd9c8213f6f4133b0e137fcf22e4d1ab76 commit face51fd9c8213f6f4133b0e137fcf22e4d1ab76 Author: Konstantin Belousov AuthorDate: 2026-09-28 22:09:03 +0000 Commit: Konstantin Belousov CommitDate: 2026-11-20 15:10:27 +0000 fstat(1), fuser(1): teach about altroot Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D60035 --- usr.bin/fstat/fstat.1 | 5 ++++- usr.bin/fstat/fstat.c | 2 ++ usr.bin/fstat/fuser.1 | 5 ++++- usr.bin/fstat/fuser.c | 1 + 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.bin/fstat/fstat.1 b/usr.bin/fstat/fstat.1 index 4d6e32438a04..7a34a00ac18f 100644 --- a/usr.bin/fstat/fstat.1 +++ b/usr.bin/fstat/fstat.1 @@ -44,7 +44,8 @@ The .Nm utility identifies open files. A file is considered open by a process if it was explicitly opened, -is the working directory, root directory, jail root directory, +is the working directory, root directory, alternative root directory, +jail root directory, active executable text, or kernel trace file for that process. If no options are specified, .Nm @@ -122,6 +123,8 @@ jail root directory memory-mapped file .It Sy root root inode +.It Sy altr +alternative root inode .It Sy text executable text inode .It Sy tr diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index e93385a5b0f6..2eb41ab5d32e 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -271,6 +271,8 @@ print_file_info(struct procstat *procstat, struct filestat *fst, printf(" wd"); else if (fst->fs_uflags & PS_FST_UFLAG_RDIR) printf(" root"); + else if (fst->fs_uflags & PS_FST_UFLAG_ADIR) + printf(" altr"); else if (fst->fs_uflags & PS_FST_UFLAG_TRACE) printf(" tr"); else if (fst->fs_uflags & PS_FST_UFLAG_MMAP) diff --git a/usr.bin/fstat/fuser.1 b/usr.bin/fstat/fuser.1 index 5def7b36d606..ff92fc930550 100644 --- a/usr.bin/fstat/fuser.1 +++ b/usr.bin/fstat/fuser.1 @@ -43,7 +43,8 @@ more named files open. For block and character special devices, all processes using files on that device are listed. A file is considered open by a process if it was explicitly opened, -is the working directory, root directory, jail root directory, +is the working directory, root directory, alternative root directory, +jail root directory, active executable text, kernel trace file or the controlling terminal of the process. If @@ -83,6 +84,8 @@ The following symbols, written to stderr will indicate how files are used: .It Sy a The file is open as append only .Pq Dv O_APPEND No was specified . +.It Sy b +The file is the alternative root directory of the process. .It Sy c The file is the current workdir directory of the process. .It Sy d diff --git a/usr.bin/fstat/fuser.c b/usr.bin/fstat/fuser.c index c38a520d4ce3..bd316d736c20 100644 --- a/usr.bin/fstat/fuser.c +++ b/usr.bin/fstat/fuser.c @@ -73,6 +73,7 @@ static const struct { {PS_FST_UFLAG_RDIR, 'r'}, {PS_FST_UFLAG_CDIR, 'c'}, {PS_FST_UFLAG_JAIL, 'j'}, + {PS_FST_UFLAG_ADIR, 'b'}, {PS_FST_UFLAG_TRACE, 't'}, {PS_FST_UFLAG_TEXT, 'x'}, {PS_FST_UFLAG_MMAP, 'm'},