We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28673d6 commit c0683f0Copy full SHA for c0683f0
src/unix/nto/mod.rs
@@ -2809,6 +2809,14 @@ f! {
2809
};
2810
::mem::size_of::<sockcred>() + ::mem::size_of::<::gid_t>() * ngrps
2811
}
2812
+
2813
+ pub fn major(dev: ::dev_t) -> ::c_uint {
2814
+ ((dev as ::c_uint) >> 10) & 0x3f
2815
+ }
2816
2817
+ pub fn minor(dev: ::dev_t) -> ::c_uint {
2818
+ (dev as ::c_uint) & 0x3ff
2819
2820
2821
2822
safe_f! {
@@ -2847,6 +2855,10 @@ safe_f! {
2847
2855
pub {const} fn IPTOS_ECN(x: u8) -> u8 {
2848
2856
x & ::IPTOS_ECN_MASK
2849
2857
2858
2859
+ pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t {
2860
+ ((major << 10) | (minor)) as ::dev_t
2861
2850
2862
2851
2863
2852
2864
// Network related functions are provided by libsocket and regex
0 commit comments