Merge branch 'cleanup_exec5' into 'master'
redox-rt: Remove unnecessary image_file field from FexecResult::Interp See merge request redox-os/relibc!790
This commit is contained in:
@@ -38,7 +38,6 @@ use syscall::{
|
||||
pub enum FexecResult {
|
||||
Interp {
|
||||
path: Box<[u8]>,
|
||||
image_file: FdGuardUpper,
|
||||
interp_override: InterpOverride,
|
||||
},
|
||||
}
|
||||
@@ -135,7 +134,6 @@ pub fn fexec_impl(
|
||||
|
||||
return Ok(FexecResult::Interp {
|
||||
path: interp.into_boxed_slice(),
|
||||
image_file,
|
||||
interp_override: InterpOverride {
|
||||
at_entry: header.e_entry as usize,
|
||||
at_phnum: phnum,
|
||||
|
||||
@@ -30,7 +30,6 @@ fn fexec_impl(
|
||||
interp_override: Option<InterpOverride>,
|
||||
) -> Result<Infallible> {
|
||||
let FexecResult::Interp {
|
||||
image_file,
|
||||
path,
|
||||
interp_override: new_interp_override,
|
||||
} = redox_rt::proc::fexec_impl(
|
||||
@@ -44,8 +43,6 @@ fn fexec_impl(
|
||||
interp_override,
|
||||
)?;
|
||||
|
||||
drop(image_file);
|
||||
|
||||
// According to elf(5), PT_INTERP requires that the interpreter path be
|
||||
// null-terminated. Violating this should therefore give the "format error" ENOEXEC.
|
||||
let path_cstr = CStr::from_bytes_with_nul(&path).map_err(|_| Error::new(ENOEXEC))?;
|
||||
|
||||
Reference in New Issue
Block a user