@@ -235,33 +235,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
235235 trace ! ( "Called pwrite({:?}, {:?}, {:?}, {:?})" , fd, buf, count, offset) ;
236236 this. write ( fd, buf, count, Some ( offset) , dest) ?;
237237 }
238- "pread64" => {
239- let [ fd, buf, count, offset] = this. check_shim_sig (
240- shim_sig ! ( extern "C" fn ( i32 , * mut _, usize , libc:: off64_t) -> isize ) ,
241- link_name,
242- abi,
243- args,
244- ) ?;
245- let fd = this. read_scalar ( fd) ?. to_i32 ( ) ?;
246- let buf = this. read_pointer ( buf) ?;
247- let count = this. read_target_usize ( count) ?;
248- let offset = this. read_scalar ( offset) ?. to_int ( offset. layout . size ) ?;
249- this. read ( fd, buf, count, Some ( offset) , dest) ?;
250- }
251- "pwrite64" => {
252- let [ fd, buf, n, offset] = this. check_shim_sig (
253- shim_sig ! ( extern "C" fn ( i32 , * const _, usize , libc:: off64_t) -> isize ) ,
254- link_name,
255- abi,
256- args,
257- ) ?;
258- let fd = this. read_scalar ( fd) ?. to_i32 ( ) ?;
259- let buf = this. read_pointer ( buf) ?;
260- let count = this. read_target_usize ( n) ?;
261- let offset = this. read_scalar ( offset) ?. to_int ( offset. layout . size ) ?;
262- trace ! ( "Called pwrite64({:?}, {:?}, {:?}, {:?})" , fd, buf, count, offset) ;
263- this. write ( fd, buf, count, Some ( offset) , dest) ?;
264- }
265238 "close" => {
266239 let [ fd] = this. check_shim_sig (
267240 shim_sig ! ( extern "C" fn ( i32 ) -> i32 ) ,
@@ -317,7 +290,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
317290 }
318291
319292 // File and file system access
320- "open" | "open64" => {
293+ "open" => {
321294 // `open` is variadic, the third argument is only present when the second argument
322295 // has O_CREAT (or on linux O_TMPFILE, but miri doesn't support that) set
323296 let ( [ path_raw, flag] , varargs) =
@@ -400,18 +373,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
400373 let result = this. closedir ( dirp) ?;
401374 this. write_scalar ( result, dest) ?;
402375 }
403- "lseek64" => {
404- let [ fd, offset, whence] = this. check_shim_sig (
405- shim_sig ! ( extern "C" fn ( i32 , libc:: off64_t, i32 ) -> libc:: off64_t) ,
406- link_name,
407- abi,
408- args,
409- ) ?;
410- let fd = this. read_scalar ( fd) ?. to_i32 ( ) ?;
411- let offset = this. read_scalar ( offset) ?. to_int ( offset. layout . size ) ?;
412- let whence = this. read_scalar ( whence) ?. to_i32 ( ) ?;
413- this. lseek64 ( fd, offset, whence, dest) ?;
414- }
415376 "lseek" => {
416377 let [ fd, offset, whence] = this. check_shim_sig (
417378 shim_sig ! ( extern "C" fn ( i32 , libc:: off_t, i32 ) -> libc:: off_t) ,
@@ -424,18 +385,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
424385 let whence = this. read_scalar ( whence) ?. to_i32 ( ) ?;
425386 this. lseek64 ( fd, offset, whence, dest) ?;
426387 }
427- "ftruncate64" => {
428- let [ fd, length] = this. check_shim_sig (
429- shim_sig ! ( extern "C" fn ( i32 , libc:: off64_t) -> i32 ) ,
430- link_name,
431- abi,
432- args,
433- ) ?;
434- let fd = this. read_scalar ( fd) ?. to_i32 ( ) ?;
435- let length = this. read_scalar ( length) ?. to_int ( length. layout . size ) ?;
436- let result = this. ftruncate64 ( fd, length) ?;
437- this. write_scalar ( result, dest) ?;
438- }
439388 "ftruncate" => {
440389 let [ fd, length] = this. check_shim_sig (
441390 shim_sig ! ( extern "C" fn ( i32 , libc:: off_t) -> i32 ) ,
@@ -516,24 +465,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
516465 this. write_scalar ( result, dest) ?;
517466 }
518467
519- "posix_fallocate64" => {
520- // posix_fallocate64 is only supported on Linux and Android
521- this. check_target_os ( & [ Os :: Linux , Os :: Android ] , link_name) ?;
522- let [ fd, offset, len] = this. check_shim_sig (
523- shim_sig ! ( extern "C" fn ( i32 , libc:: off64_t, libc:: off64_t) -> i32 ) ,
524- link_name,
525- abi,
526- args,
527- ) ?;
528-
529- let fd = this. read_scalar ( fd) ?. to_i32 ( ) ?;
530- let offset = this. read_scalar ( offset) ?. to_i64 ( ) ?;
531- let len = this. read_scalar ( len) ?. to_i64 ( ) ?;
532-
533- let result = this. posix_fallocate ( fd, offset, len) ?;
534- this. write_scalar ( result, dest) ?;
535- }
536-
537468 "realpath" => {
538469 let [ path, resolved_path] = this. check_shim_sig (
539470 shim_sig ! ( extern "C" fn ( * const _, * mut _) -> * mut _) ,
0 commit comments