* Applied patch by Adrian that let the buffer size allocated vary with what
is needed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29590 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -153,7 +153,11 @@ compat_write(void *cookie, off_t position, const void *buffer,
|
||||
//if_printf(ifp, "compat_write(%lld, %p, [%lu])\n", position,
|
||||
// buffer, *numBytes);
|
||||
|
||||
mb = m_getcl(0, MT_DATA, M_PKTHDR);
|
||||
if (*numBytes > MHLEN)
|
||||
mb = m_getcl(0, MT_DATA, M_PKTHDR);
|
||||
else
|
||||
mb = m_gethdr(0, MT_DATA);
|
||||
|
||||
if (mb == NULL)
|
||||
return ENOBUFS;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user