From: Ben Gras Date: Mon, 18 Jul 2005 12:31:11 +0000 (+0000) Subject: Made memset system call listen to character argument X-Git-Tag: v3.1.0~604 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/cppcheck-error.log?a=commitdiff_plain;h=1f756d377a412a92e66693ecc44d5a894cf3d8c9;p=minix.git Made memset system call listen to character argument --- diff --git a/kernel/system/do_memset.c b/kernel/system/do_memset.c index b746abfcf..224c43724 100644 --- a/kernel/system/do_memset.c +++ b/kernel/system/do_memset.c @@ -18,7 +18,10 @@ PUBLIC int do_memset(m_ptr) register message *m_ptr; { /* Handle sys_memset(). */ - phys_fill((phys_bytes) m_ptr->MEM_PTR, (phys_bytes) m_ptr->MEM_COUNT, 0); + unsigned long pat; + unsigned char c = m_ptr->MEM_CHAR; + pat = c | (c << 8) | (c << 16) | (c << 24); + phys_fill((phys_bytes) m_ptr->MEM_PTR, (phys_bytes) m_ptr->MEM_COUNT, pat); return(OK); }