Removed useless global variable sys_call_code

- we have to same information in the message (m_ptr) where needed
This commit is contained in:
Tomas Hruby
2010-02-03 18:17:01 +00:00
parent 15b0595013
commit 8f82633fa2
3 changed files with 4 additions and 6 deletions
+3 -3
View File
@@ -337,15 +337,15 @@ PUBLIC int do_safecopy(struct proc * caller, message * m_ptr)
static int access, src_seg, dst_seg;
/* Set src and dst parameters. */
if(sys_call_code == SYS_SAFECOPYFROM) {
if(m_ptr->m_type == SYS_SAFECOPYFROM) {
src_seg = D;
dst_seg = m_ptr->SCP_SEG;
access = CPF_READ;
} else if(sys_call_code == SYS_SAFECOPYTO) {
} else if(m_ptr->m_type == SYS_SAFECOPYTO) {
src_seg = m_ptr->SCP_SEG;
dst_seg = D;
access = CPF_WRITE;
} else minix_panic("Impossible system call nr. ", sys_call_code);
} else minix_panic("Impossible system call nr. ", m_ptr->m_type);
return safecopy(caller, m_ptr->SCP_FROM_TO, caller->p_endpoint,
m_ptr->SCP_GID, src_seg, dst_seg, m_ptr->SCP_BYTES,