From 1b6a04ca5504955c571d1c97504fb45ea0befee4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Mon, 8 Jan 2024 01:21:28 +0400 Subject: Initial vendor packages Signed-off-by: Valentin Popov --- vendor/rustix/src/fs/makedev.rs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 vendor/rustix/src/fs/makedev.rs (limited to 'vendor/rustix/src/fs/makedev.rs') diff --git a/vendor/rustix/src/fs/makedev.rs b/vendor/rustix/src/fs/makedev.rs new file mode 100644 index 0000000..5793058 --- /dev/null +++ b/vendor/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