[___syscall5] debug messages

This commit is contained in:
Jesús Leganés-Combarro 'piranna 2019-07-04 07:02:47 +02:00
parent 91587c8bde
commit cc83ec9ac1

View File

@ -120,13 +120,12 @@ pub fn ___syscall5(ctx: &mut Ctx, _which: c_int, mut varargs: VarArgs) -> c_int
let _path_str = unsafe { std::ffi::CStr::from_ptr(real_path).to_str().unwrap() }; let _path_str = unsafe { std::ffi::CStr::from_ptr(real_path).to_str().unwrap() };
let fd = unsafe { open(real_path, flags, mode) }; let fd = unsafe { open(real_path, flags, mode) };
debug!( debug!(
"=> path: {}, flags: {}, mode: {} = fd: {}, last os error: {}", "=> path: {}, flags: {}, mode: {} = fd: {}",
_path_str, _path_str, flags, mode, fd,
flags,
mode,
fd,
Error::last_os_error(),
); );
if fd == -1 {
debug!("=> last os error: {}", Error::last_os_error(),);
}
fd fd
} }