Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Calculate GETISPACE/GETOSPACE properly.
details: https://anonhg.NetBSD.org/src/rev/bf1c8fcf979a
branches: trunk
changeset: 352267:bf1c8fcf979a
user: nat <nat%NetBSD.org@localhost>
date: Thu Mar 23 15:50:48 2017 +0000
description:
Calculate GETISPACE/GETOSPACE properly.
Bump version.
Addresses PR kern/51999.
diffstat:
distrib/sets/lists/base/shl.mi | 4 ++--
lib/libossaudio/ossaudio.c | 18 ++++++++----------
lib/libossaudio/shlib_version | 4 ++--
3 files changed, 12 insertions(+), 14 deletions(-)
diffs (77 lines):
diff -r 5037a7701257 -r bf1c8fcf979a distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi Thu Mar 23 14:52:36 2017 +0000
+++ b/distrib/sets/lists/base/shl.mi Thu Mar 23 15:50:48 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.804 2017/03/11 16:36:01 christos Exp $
+# $NetBSD: shl.mi,v 1.805 2017/03/23 15:50:48 nat Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@@ -417,7 +417,7 @@
./usr/lib/libopenpgpsdk.so.0.9 base-obsolete obsolete
./usr/lib/libossaudio.so base-sys-shlib compatfile
./usr/lib/libossaudio.so.1 base-sys-shlib compatfile
-./usr/lib/libossaudio.so.1.1 base-sys-shlib compatfile
+./usr/lib/libossaudio.so.1.2 base-sys-shlib compatfile
./usr/lib/libp2k.so base-puffs-shlib compatfile,rump
./usr/lib/libp2k.so.2 base-puffs-shlib compatfile,rump
./usr/lib/libp2k.so.2.0 base-puffs-shlib compatfile,rump
diff -r 5037a7701257 -r bf1c8fcf979a lib/libossaudio/ossaudio.c
--- a/lib/libossaudio/ossaudio.c Thu Mar 23 14:52:36 2017 +0000
+++ b/lib/libossaudio/ossaudio.c Thu Mar 23 15:50:48 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ossaudio.c,v 1.32 2017/02/10 08:52:04 maya Exp $ */
+/* $NetBSD: ossaudio.c,v 1.33 2017/03/23 15:50:48 nat Exp $ */
/*-
* Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: ossaudio.c,v 1.32 2017/02/10 08:52:04 maya Exp $");
+__RCSID("$NetBSD: ossaudio.c,v 1.33 2017/03/23 15:50:48 nat Exp $");
/*
* This is an OSS (Linux) sound API emulator.
@@ -411,11 +411,11 @@
return retval;
setblocksize(fd, &tmpinfo);
bufinfo.fragsize = tmpinfo.blocksize;
- bufinfo.fragments = tmpinfo.hiwat - (tmpinfo.play.seek
- + tmpinfo.blocksize - 1) / tmpinfo.blocksize;
+ bufinfo.fragments = (tmpinfo.hiwat * tmpinfo.blocksize -
+ (tmpinfo.play.seek + tmpinfo.blocksize -1)) /
+ tmpinfo.blocksize;
bufinfo.fragstotal = tmpinfo.hiwat;
- bufinfo.bytes = tmpinfo.hiwat * tmpinfo.blocksize
- - tmpinfo.play.seek;
+ bufinfo.bytes = bufinfo.fragments * tmpinfo.blocksize;
*(struct audio_buf_info *)argp = bufinfo;
break;
case SNDCTL_DSP_GETISPACE:
@@ -424,11 +424,9 @@
return retval;
setblocksize(fd, &tmpinfo);
bufinfo.fragsize = tmpinfo.blocksize;
- bufinfo.fragments = tmpinfo.hiwat - (tmpinfo.record.seek +
- tmpinfo.blocksize - 1) / tmpinfo.blocksize;
+ bufinfo.fragments = tmpinfo.record.seek / tmpinfo.blocksize;
bufinfo.fragstotal = tmpinfo.hiwat;
- bufinfo.bytes = tmpinfo.hiwat * tmpinfo.blocksize
- - tmpinfo.record.seek;
+ bufinfo.bytes = bufinfo.fragments * tmpinfo.blocksize;
*(struct audio_buf_info *)argp = bufinfo;
break;
case SNDCTL_DSP_NONBLOCK:
diff -r 5037a7701257 -r bf1c8fcf979a lib/libossaudio/shlib_version
--- a/lib/libossaudio/shlib_version Thu Mar 23 14:52:36 2017 +0000
+++ b/lib/libossaudio/shlib_version Thu Mar 23 15:50:48 2017 +0000
@@ -1,5 +1,5 @@
-# $NetBSD: shlib_version,v 1.7 2014/05/18 10:38:40 nat Exp $
+# $NetBSD: shlib_version,v 1.8 2017/03/23 15:50:48 nat Exp $
# Remember to update distrib/sets/lists/base/shl.* when changing
#
major=1
-minor=1
+minor=2
Home |
Main Index |
Thread Index |
Old Index