From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id A07F81FF0DF for ; Fri, 28 Aug 2026 16:55:47 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 480FC2153C; Fri, 28 Aug 2026 16:55:46 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Aug 2026 16:55:42 +0200 Message-Id: Subject: Re: [PATCH proxmox] sys: fs: re-export nix types used in file creation API From: "Thomas Ellmenreich" To: "Arthur Bied-Charreton" , X-Mailer: aerc 0.20.0 References: <20260715115447.332954-1-a.bied-charreton@proxmox.com> In-Reply-To: <20260715115447.332954-1-a.bied-charreton@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1787928932639 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.668 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 6YKSCOZM5SBSNCE7TY6QVGVBV7N7WVZD X-Message-ID-Hash: 6YKSCOZM5SBSNCE7TY6QVGVBV7N7WVZD X-MailFrom: t.ellmenreich@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: I think this change makes sense. I noticed that fs/mod.rs contains a few uses of `stat::Mode`, which could now be replaced with just `Mode`. Not sure if that is wanted, though. Reviewed-by: Thomas Ellmenreich On Wed Jul 15, 2026 at 1:54 PM CEST, Arthur Bied-Charreton wrote: > Several public helpers in proxmox-sys::fs take nix types in their > signatures: Mode, Uid and Gid for CreateOptions and fchown() and OFlag > for atomic_open_or_create_file(). Until now, this forced consumers to > pull in nix explicitly just to call/instantiate them. > > Re-export those types from proxmox-sys::fs so they can be imported from > there directly. > > Signed-off-by: Arthur Bied-Charreton [snip] > use nix::sys::stat; > -use nix::unistd::{Gid, Uid}; > +pub use nix::sys::stat::Mode; > +pub use nix::unistd::{Gid, Uid}; > use std::os::unix::io::{AsRawFd, RawFd}; > =20 > #[cfg(feature =3D "acl")]