@@ -170,63 +170,63 @@ macro_rules! ioctl {
170
170
pub unsafe fn $name( fd: $crate:: libc:: c_int,
171
171
data: * mut u8 )
172
172
-> $crate:: Result <$crate:: libc:: c_int> {
173
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: libc :: c_ulong , data) )
173
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: sys :: ioctl :: ioctl_num_type , data) )
174
174
}
175
175
) ;
176
176
( bad none $name: ident with $nr: expr) => (
177
177
pub unsafe fn $name( fd: $crate:: libc:: c_int)
178
178
-> $crate:: Result <$crate:: libc:: c_int> {
179
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: libc :: c_ulong ) )
179
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, $nr as $crate:: sys :: ioctl :: ioctl_num_type ) )
180
180
}
181
181
) ;
182
182
( none $name: ident with $ioty: expr, $nr: expr) => (
183
183
pub unsafe fn $name( fd: $crate:: libc:: c_int)
184
184
-> $crate:: Result <$crate:: libc:: c_int> {
185
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, io!( $ioty, $nr) as $crate:: libc :: c_ulong ) )
185
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, io!( $ioty, $nr) as $crate:: sys :: ioctl :: ioctl_num_type ) )
186
186
}
187
187
) ;
188
188
( read $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
189
189
pub unsafe fn $name( fd: $crate:: libc:: c_int,
190
190
val: * mut $ty)
191
191
-> $crate:: Result <$crate:: libc:: c_int> {
192
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: libc :: c_ulong , val) )
192
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
193
193
}
194
194
) ;
195
195
( write $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
196
196
pub unsafe fn $name( fd: $crate:: libc:: c_int,
197
197
val: $ty)
198
198
-> $crate:: Result <$crate:: libc:: c_int> {
199
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: libc :: c_ulong , val) )
199
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
200
200
}
201
201
) ;
202
202
( readwrite $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
203
203
pub unsafe fn $name( fd: $crate:: libc:: c_int,
204
204
val: * mut $ty)
205
205
-> $crate:: Result <$crate:: libc:: c_int> {
206
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: libc :: c_ulong , val) )
206
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, :: std:: mem:: size_of:: <$ty>( ) ) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
207
207
}
208
208
) ;
209
209
( read buf $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
210
210
pub unsafe fn $name( fd: $crate:: libc:: c_int,
211
211
val: * mut $ty,
212
212
len: usize )
213
213
-> $crate:: Result <$crate:: libc:: c_int> {
214
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, len) as $crate:: libc :: c_ulong , val) )
214
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, ior!( $ioty, $nr, len) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
215
215
}
216
216
) ;
217
217
( write buf $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
218
218
pub unsafe fn $name( fd: $crate:: libc:: c_int,
219
219
val: * const $ty,
220
220
len: usize ) -> $crate:: Result <$crate:: libc:: c_int> {
221
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, len) as $crate:: libc :: c_ulong , val) )
221
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iow!( $ioty, $nr, len) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
222
222
}
223
223
) ;
224
224
( readwrite buf $name: ident with $ioty: expr, $nr: expr; $ty: ty) => (
225
225
pub unsafe fn $name( fd: $crate:: libc:: c_int,
226
226
val: * mut $ty,
227
227
len: usize )
228
228
-> $crate:: Result <$crate:: libc:: c_int> {
229
- convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, len) as $crate:: libc :: c_ulong , val) )
229
+ convert_ioctl_res!( $crate:: libc:: ioctl( fd, iorw!( $ioty, $nr, len) as $crate:: sys :: ioctl :: ioctl_num_type , val) )
230
230
}
231
231
) ;
232
232
}
0 commit comments