Add support for OpenOptions::create_new()/O_EXCL
This commit is contained in:
parent
3504d52668
commit
808709c288
2 changed files with 26 additions and 2 deletions
|
|
@ -288,8 +288,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
}
|
||||
let o_creat = this.eval_libc_i32("O_CREAT")?;
|
||||
if flag & o_creat != 0 {
|
||||
options.create(true);
|
||||
mirror |= o_creat;
|
||||
|
||||
let o_excl = this.eval_libc_i32("O_EXCL")?;
|
||||
if flag & o_excl != 0 {
|
||||
mirror |= o_excl;
|
||||
options.create_new(true);
|
||||
} else {
|
||||
options.create(true);
|
||||
}
|
||||
}
|
||||
let o_cloexec = this.eval_libc_i32("O_CLOEXEC")?;
|
||||
if flag & o_cloexec != 0 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue