@@ -21,7 +21,7 @@ pub(crate) enum FlockOp {
21
21
Unlock ,
22
22
}
23
23
24
- /// Represents an open file descriptor .
24
+ /// Represents an open file description .
25
25
pub trait FileDescription : std:: fmt:: Debug + Any {
26
26
fn name ( & self ) -> & ' static str ;
27
27
@@ -303,7 +303,7 @@ pub struct FdTable {
303
303
304
304
impl VisitProvenance for FdTable {
305
305
fn visit_provenance ( & self , _visit : & mut VisitWith < ' _ > ) {
306
- // All our FileDescriptor do not have any tags.
306
+ // All our FileDescriptionRef do not have any tags.
307
307
}
308
308
}
309
309
@@ -411,7 +411,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
411
411
412
412
fn flock ( & mut self , fd : i32 , op : i32 ) -> InterpResult < ' tcx , Scalar > {
413
413
let this = self . eval_context_mut ( ) ;
414
- let Some ( file_descriptor ) = this. machine . fds . get ( fd) else {
414
+ let Some ( fd_ref ) = this. machine . fds . get ( fd) else {
415
415
return Ok ( Scalar :: from_i32 ( this. fd_not_found ( ) ?) ) ;
416
416
} ;
417
417
@@ -436,8 +436,8 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
436
436
throw_unsup_format ! ( "unsupported flags {:#x}" , op) ;
437
437
} ;
438
438
439
- let result = file_descriptor . flock ( this. machine . communicate ( ) , parsed_op) ?;
440
- drop ( file_descriptor ) ;
439
+ let result = fd_ref . flock ( this. machine . communicate ( ) , parsed_op) ?;
440
+ drop ( fd_ref ) ;
441
441
// return `0` if flock is successful
442
442
let result = result. map ( |( ) | 0i32 ) ;
443
443
Ok ( Scalar :: from_i32 ( this. try_unwrap_io_result ( result) ?) )
@@ -539,7 +539,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
539
539
) -> InterpResult < ' tcx , Scalar > {
540
540
let this = self . eval_context_mut ( ) ;
541
541
542
- // Isolation check is done via `FileDescriptor ` trait.
542
+ // Isolation check is done via `FileDescription ` trait.
543
543
544
544
trace ! ( "Reading from FD {}, size {}" , fd, count) ;
545
545
@@ -604,7 +604,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
604
604
) -> InterpResult < ' tcx , Scalar > {
605
605
let this = self . eval_context_mut ( ) ;
606
606
607
- // Isolation check is done via `FileDescriptor ` trait.
607
+ // Isolation check is done via `FileDescription ` trait.
608
608
609
609
// Check that the *entire* buffer is actually valid memory.
610
610
this. check_ptr_access ( buf, Size :: from_bytes ( count) , CheckInAllocMsg :: MemoryAccessTest ) ?;
0 commit comments