File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -392,7 +392,7 @@ impl<'a> Nmount<'a> {
392
392
393
393
let niov = self . iov . len ( ) as c_uint ;
394
394
let iovp = self . iov . as_mut_ptr ( ) as * mut libc:: iovec ;
395
- let res = unsafe { libc:: nmount ( iovp, niov, flags. bits ) } ;
395
+ let res = unsafe { libc:: nmount ( iovp, niov, flags. bits ( ) ) } ;
396
396
match Errno :: result ( res) {
397
397
Ok ( _) => Ok ( ( ) ) ,
398
398
Err ( error) => {
@@ -446,7 +446,7 @@ where
446
446
P : ?Sized + NixPath ,
447
447
{
448
448
let res = mountpoint. with_nix_path ( |cstr| unsafe {
449
- libc:: unmount ( cstr. as_ptr ( ) , flags. bits )
449
+ libc:: unmount ( cstr. as_ptr ( ) , flags. bits ( ) )
450
450
} ) ?;
451
451
452
452
Errno :: result ( res) . map ( drop)
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ pub fn mount<
132
132
s,
133
133
t. as_ptr ( ) ,
134
134
ty,
135
- flags. bits ,
135
+ flags. bits ( ) ,
136
136
d as * const libc:: c_void ,
137
137
)
138
138
} )
@@ -156,7 +156,7 @@ pub fn umount<P: ?Sized + NixPath>(target: &P) -> Result<()> {
156
156
/// See also [`umount`](https://man7.org/linux/man-pages/man2/umount.2.html)
157
157
pub fn umount2 < P : ?Sized + NixPath > ( target : & P , flags : MntFlags ) -> Result < ( ) > {
158
158
let res = target. with_nix_path ( |cstr| unsafe {
159
- libc:: umount2 ( cstr. as_ptr ( ) , flags. bits )
159
+ libc:: umount2 ( cstr. as_ptr ( ) , flags. bits ( ) )
160
160
} ) ?;
161
161
162
162
Errno :: result ( res) . map ( drop)
Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ impl MqAttr {
139
139
/// Open a message queue
140
140
///
141
141
/// See also [`mq_open(2)`](https://pubs.opengroup.org/onlinepubs/9699919799/functions/mq_open.html)
142
- // The mode.bits cast is only lossless on some OSes
142
+ // The mode.bits() cast is only lossless on some OSes
143
143
#[ allow( clippy:: cast_lossless) ]
144
144
pub fn mq_open (
145
145
name : & CStr ,
Original file line number Diff line number Diff line change @@ -177,7 +177,7 @@ pub fn mknod<P: ?Sized + NixPath>(
177
177
dev : dev_t ,
178
178
) -> Result < ( ) > {
179
179
let res = path. with_nix_path ( |cstr| unsafe {
180
- libc:: mknod ( cstr. as_ptr ( ) , kind. bits | perm. bits ( ) as mode_t , dev)
180
+ libc:: mknod ( cstr. as_ptr ( ) , kind. bits ( ) | perm. bits ( ) as mode_t , dev)
181
181
} ) ?;
182
182
183
183
Errno :: result ( res) . map ( drop)
@@ -202,7 +202,7 @@ pub fn mknodat<P: ?Sized + NixPath>(
202
202
libc:: mknodat (
203
203
dirfd,
204
204
cstr. as_ptr ( ) ,
205
- kind. bits | perm. bits ( ) as mode_t ,
205
+ kind. bits ( ) | perm. bits ( ) as mode_t ,
206
206
dev,
207
207
)
208
208
} ) ?;
Original file line number Diff line number Diff line change @@ -3375,7 +3375,7 @@ feature! {
3375
3375
/// See [access(2)](https://pubs.opengroup.org/onlinepubs/9699919799/functions/access.html)
3376
3376
pub fn access<P : ?Sized + NixPath >( path: & P , amode: AccessFlags ) -> Result <( ) > {
3377
3377
let res = path. with_nix_path( |cstr| unsafe {
3378
- libc:: access( cstr. as_ptr( ) , amode. bits)
3378
+ libc:: access( cstr. as_ptr( ) , amode. bits( ) )
3379
3379
} ) ?;
3380
3380
Errno :: result( res) . map( drop)
3381
3381
}
@@ -3422,7 +3422,7 @@ pub fn faccessat<P: ?Sized + NixPath>(
3422
3422
) ) ]
3423
3423
pub fn eaccess<P : ?Sized + NixPath >( path: & P , mode: AccessFlags ) -> Result <( ) > {
3424
3424
let res = path. with_nix_path( |cstr| unsafe {
3425
- libc:: eaccess( cstr. as_ptr( ) , mode. bits)
3425
+ libc:: eaccess( cstr. as_ptr( ) , mode. bits( ) )
3426
3426
} ) ?;
3427
3427
Errno :: result( res) . map( drop)
3428
3428
}
You can’t perform that action at this time.
0 commit comments