From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- third_party/rust/rustix/src/fs/makedev.rs | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 third_party/rust/rustix/src/fs/makedev.rs (limited to 'third_party/rust/rustix/src/fs/makedev.rs') diff --git a/third_party/rust/rustix/src/fs/makedev.rs b/third_party/rust/rustix/src/fs/makedev.rs new file mode 100644 index 0000000000..5793058ffa --- /dev/null +++ b/third_party/rust/rustix/src/fs/makedev.rs @@ -0,0 +1,35 @@ +use crate::backend; +use crate::fs::Dev; + +/// `makedev(maj, min)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/makedev.3.html +#[inline] +pub fn makedev(maj: u32, min: u32) -> Dev { + backend::fs::makedev::makedev(maj, min) +} + +/// `minor(dev)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/minor.3.html +#[inline] +pub fn minor(dev: Dev) -> u32 { + backend::fs::makedev::minor(dev) +} + +/// `major(dev)` +/// +/// # References +/// - [Linux] +/// +/// [Linux]: https://man7.org/linux/man-pages/man3/major.3.html +#[inline] +pub fn major(dev: Dev) -> u32 { + backend::fs::makedev::major(dev) +} -- cgit v1.2.3