SETFRAGMENT ignores the high bit.
This commit is contained in:
parent
0f95ffdc1d
commit
aa1112aed5
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ossaudio.c,v 1.23 1997/10/19 07:41:52 augustss Exp $ */
|
||||
/* $NetBSD: ossaudio.c,v 1.24 1998/03/19 06:53:28 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -312,7 +312,7 @@ oss_ioctl_audio(p, uap, retval)
|
||||
if ((idat & 0xffff) < 4 || (idat & 0xffff) > 17)
|
||||
return EINVAL;
|
||||
tmpinfo.blocksize = 1 << (idat & 0xffff);
|
||||
tmpinfo.hiwat = (idat >> 16) & 0xffff;
|
||||
tmpinfo.hiwat = (idat >> 16) & 0x7fff;
|
||||
DPRINTF(("oss_audio: SETFRAGMENT blksize=%d, hiwat=%d\n",
|
||||
tmpinfo.blocksize, tmpinfo.hiwat));
|
||||
if (tmpinfo.hiwat == 0) /* 0 means set to max */
|
||||
@ -324,7 +324,7 @@ oss_ioctl_audio(p, uap, retval)
|
||||
u = tmpinfo.blocksize;
|
||||
for(idat = 0; u; idat++, u >>= 1)
|
||||
;
|
||||
idat |= (tmpinfo.hiwat & 0xffff) << 16;
|
||||
idat |= (tmpinfo.hiwat & 0x7fff) << 16;
|
||||
error = copyout(&idat, SCARG(uap, data), sizeof idat);
|
||||
if (error)
|
||||
return error;
|
||||
|
Loading…
Reference in New Issue
Block a user