Skip to content

Commit 3500c16

Browse files
committed
Fix stray update
1 parent 64e95f8 commit 3500c16

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/tools/miri/src/shims/unix/foreign_items.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -453,35 +453,6 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
453453
}
454454
}
455455

456-
// Querying system information
457-
"sysconf" => {
458-
let [name] = this.check_shim(abi, Conv::C , link_name, args)?;
459-
let name = this.read_scalar(name)?.to_i32()?;
460-
// FIXME: Which of these are POSIX, and which are GNU/Linux?
461-
// At least the names seem to all also exist on macOS.
462-
let sysconfs: &[(&str, fn(&MiriInterpCx<'_>) -> Scalar)] = &[
463-
("_SC_PAGESIZE", |this| Scalar::from_int(this.machine.page_size, this.pointer_size())),
464-
("_SC_NPROCESSORS_CONF", |this| Scalar::from_int(this.machine.num_cpus, this.pointer_size())),
465-
("_SC_NPROCESSORS_ONLN", |this| Scalar::from_int(this.machine.num_cpus, this.pointer_size())),
466-
// 512 seems to be a reasonable default. The value is not critical, in
467-
// the sense that getpwuid_r takes and checks the buffer length.
468-
("_SC_GETPW_R_SIZE_MAX", |this| Scalar::from_int(512, this.pointer_size()))
469-
];
470-
let mut result = None;
471-
for &(sysconf_name, value) in sysconfs {
472-
let sysconf_name = this.eval_libc_i32(sysconf_name);
473-
if sysconf_name == name {
474-
result = Some(value(this));
475-
break;
476-
}
477-
}
478-
if let Some(result) = result {
479-
this.write_scalar(result, dest)?;
480-
} else {
481-
throw_unsup_format!("unimplemented sysconf name: {}", name)
482-
}
483-
}
484-
485456
// Thread-local storage
486457
"pthread_key_create" => {
487458
let [key, dtor] = this.check_shim(abi, Conv::C , link_name, args)?;

0 commit comments

Comments
 (0)