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 2EB851FF0E5 for ; Wed, 15 Jul 2026 13:55:25 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 70DE9213F2; Wed, 15 Jul 2026 13:55:24 +0200 (CEST) From: Arthur Bied-Charreton To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox] sys: fs: re-export nix types used in file creation API Date: Wed, 15 Jul 2026 13:54:47 +0200 Message-ID: <20260715115447.332954-1-a.bied-charreton@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 2 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: GO72TJDTWT4N2MWP6I3BCWUTGEZWWEZD X-Message-ID-Hash: GO72TJDTWT4N2MWP6I3BCWUTGEZWWEZD X-MailFrom: abied-charreton@jett.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: 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 --- proxmox-sys/src/fs/file.rs | 2 +- proxmox-sys/src/fs/mod.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/proxmox-sys/src/fs/file.rs b/proxmox-sys/src/fs/file.rs index b52bd922..82460035 100644 --- a/proxmox-sys/src/fs/file.rs +++ b/proxmox-sys/src/fs/file.rs @@ -8,7 +8,7 @@ use std::time::Duration; use anyhow::{Context as _, Error, bail, format_err}; use nix::NixPath; use nix::errno::Errno; -use nix::fcntl::OFlag; +pub use nix::fcntl::OFlag; use nix::sys::stat; use nix::unistd; use serde_json::Value; diff --git a/proxmox-sys/src/fs/mod.rs b/proxmox-sys/src/fs/mod.rs index 6cda6326..c3fad318 100644 --- a/proxmox-sys/src/fs/mod.rs +++ b/proxmox-sys/src/fs/mod.rs @@ -4,7 +4,8 @@ use std::path::Path; use anyhow::{Context, Error, bail}; 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}; #[cfg(feature = "acl")] -- 2.47.3