public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox] sys: fs: re-export nix types used in file creation API
@ 2026-07-15 11:54 Arthur Bied-Charreton
  0 siblings, 0 replies; only message in thread
From: Arthur Bied-Charreton @ 2026-07-15 11:54 UTC (permalink / raw)
  To: pve-devel

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 <a.bied-charreton@proxmox.com>
---
 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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-15 11:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-15 11:54 [PATCH proxmox] sys: fs: re-export nix types used in file creation API Arthur Bied-Charreton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal