From: Arthur Bied-Charreton <a.bied-charreton@proxmox.com>
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 [thread overview]
Message-ID: <20260715115447.332954-1-a.bied-charreton@proxmox.com> (raw)
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
reply other threads:[~2026-07-15 11:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260715115447.332954-1-a.bied-charreton@proxmox.com \
--to=a.bied-charreton@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.