1 | use crate::backend; |
2 | use crate::fs::Dev; |
3 | |
4 | /// `makedev(maj, min)` |
5 | /// |
6 | /// # References |
7 | /// - [Linux] |
8 | /// |
9 | /// [Linux]: https://man7.org/linux/man-pages/man3/makedev.3.html |
10 | #[inline ] |
11 | pub fn makedev(maj: u32, min: u32) -> Dev { |
12 | backend::fs::makedev::makedev(maj, min) |
13 | } |
14 | |
15 | /// `minor(dev)` |
16 | /// |
17 | /// # References |
18 | /// - [Linux] |
19 | /// |
20 | /// [Linux]: https://man7.org/linux/man-pages/man3/minor.3.html |
21 | #[inline ] |
22 | pub fn minor(dev: Dev) -> u32 { |
23 | backend::fs::makedev::minor(dev) |
24 | } |
25 | |
26 | /// `major(dev)` |
27 | /// |
28 | /// # References |
29 | /// - [Linux] |
30 | /// |
31 | /// [Linux]: https://man7.org/linux/man-pages/man3/major.3.html |
32 | #[inline ] |
33 | pub fn major(dev: Dev) -> u32 { |
34 | backend::fs::makedev::major(dev) |
35 | } |
36 | |