pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/emulators/qemu qemu: fixed block driver whitelisting p...
details: https://anonhg.NetBSD.org/pkgsrc/rev/a76f973f7d14
branches: trunk
changeset: 372676:a76f973f7d14
user: adam <adam%pkgsrc.org@localhost>
date: Thu Dec 14 08:01:10 2017 +0000
description:
qemu: fixed block driver whitelisting problem
diffstat:
emulators/qemu/distinfo | 5 ++-
emulators/qemu/patches/patch-audio_audio.c | 16 +++++++++++
emulators/qemu/patches/patch-block.c | 42 ++++++++++++++++++++++++++++++
emulators/qemu/patches/patch-ef | 16 -----------
4 files changed, 61 insertions(+), 18 deletions(-)
diffs (107 lines):
diff -r 0c4247a54a1c -r a76f973f7d14 emulators/qemu/distinfo
--- a/emulators/qemu/distinfo Thu Dec 14 07:32:29 2017 +0000
+++ b/emulators/qemu/distinfo Thu Dec 14 08:01:10 2017 +0000
@@ -1,14 +1,15 @@
-$NetBSD: distinfo,v 1.130 2017/12/14 02:03:52 kamil Exp $
+$NetBSD: distinfo,v 1.131 2017/12/14 08:01:10 adam Exp $
SHA1 (qemu-2.11.0.tar.xz) = 458f3382fe5028faa89174a7321d21a0a8058b63
RMD160 (qemu-2.11.0.tar.xz) = 3e9094d77312ae762dae216d453871d26cfc7e3a
SHA512 (qemu-2.11.0.tar.xz) = 902cb11bcfde03a139efb8e5af978364d4160c9943142b1b3f92045066bf004aad7733ddb4d033aab40559cb00a79c907e0ffecf546e4a1a3659c19ec463940e
Size (qemu-2.11.0.tar.xz) = 28984736 bytes
SHA1 (patch-Makefile) = b3899fb8d0dd2f29bf3edd843836612e6e6c019c
+SHA1 (patch-audio_audio.c) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
+SHA1 (patch-block.c) = 6f54da333696584067a7556b8cabfa8853758824
SHA1 (patch-configure) = 179486600f69c2678bd8ffc62626d919e4688386
SHA1 (patch-contrib_ivshmem-client_ivshmem-client.c) = 40c8751607cbf66a37e4c4e08f2664b864e2e984
SHA1 (patch-contrib_ivshmem-server_ivshmem-server.c) = d8f53432b5752f4263dc4ef96108a976a05147a3
-SHA1 (patch-ef) = 98a1de2fd48638886b5d16f6a61dc72910e98b41
SHA1 (patch-hw_display_omap__dss.c) = 6b13242f28e32346bc70548c216c578d98fd3420
SHA1 (patch-hw_net_etraxfs__eth.c) = e5dd1661d60dbcd27b332403e0843500ba9544bc
SHA1 (patch-hw_net_xilinx__axienet.c) = ebcd2676d64ce6f31e4a8c976d4fdf530ad5e8b7
diff -r 0c4247a54a1c -r a76f973f7d14 emulators/qemu/patches/patch-audio_audio.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-audio_audio.c Thu Dec 14 08:01:10 2017 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-audio_audio.c,v 1.1 2017/12/14 08:01:10 adam Exp $
+
+Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
+(PR lib/43832: ssp causes common names to be defines)
+
+--- audio/audio.c.orig 2016-09-02 15:34:17.000000000 +0000
++++ audio/audio.c
+@@ -1156,7 +1156,7 @@ int AUD_read (SWVoiceIn *sw, void *buf,
+ return 0;
+ }
+
+- return sw->hw->pcm_ops->read(sw, buf, size);
++ return (sw->hw->pcm_ops->read)(sw, buf, size);
+ }
+
+ int AUD_get_buffer_size_out (SWVoiceOut *sw)
diff -r 0c4247a54a1c -r a76f973f7d14 emulators/qemu/patches/patch-block.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/emulators/qemu/patches/patch-block.c Thu Dec 14 08:01:10 2017 +0000
@@ -0,0 +1,42 @@
+$NetBSD: patch-block.c,v 1.1 2017/12/14 08:01:11 adam Exp $
+
+Remove block driver whitelisting logic; reasons being:
+- PkgSrc does not configure Qemu to use whitelisting
+- sometimes CONFIG...WHITELIST macros contain ["", NULL],
+ and bdrv_is_whitelisted() fails.
+
+--- block.c.orig 2017-12-04 12:07:17.000000000 +0000
++++ block.c
+@@ -369,31 +369,7 @@ BlockDriver *bdrv_find_format(const char
+
+ static int bdrv_is_whitelisted(BlockDriver *drv, bool read_only)
+ {
+- static const char *whitelist_rw[] = {
+- CONFIG_BDRV_RW_WHITELIST
+- };
+- static const char *whitelist_ro[] = {
+- CONFIG_BDRV_RO_WHITELIST
+- };
+- const char **p;
+-
+- if (!whitelist_rw[0] && !whitelist_ro[0]) {
+- return 1; /* no whitelist, anything goes */
+- }
+-
+- for (p = whitelist_rw; *p; p++) {
+- if (!strcmp(drv->format_name, *p)) {
+- return 1;
+- }
+- }
+- if (read_only) {
+- for (p = whitelist_ro; *p; p++) {
+- if (!strcmp(drv->format_name, *p)) {
+- return 1;
+- }
+- }
+- }
+- return 0;
++ return 1;
+ }
+
+ bool bdrv_uses_whitelist(void)
diff -r 0c4247a54a1c -r a76f973f7d14 emulators/qemu/patches/patch-ef
--- a/emulators/qemu/patches/patch-ef Thu Dec 14 07:32:29 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-ef,v 1.8 2016/09/04 09:21:04 ryoon Exp $
-
-Avoid conflicts with SSP read() macro in NetBSD's <ssp/unistd.h>
-(PR lib/43832: ssp causes common names to be defines)
-
---- audio/audio.c.orig 2016-09-02 15:34:17.000000000 +0000
-+++ audio/audio.c
-@@ -1156,7 +1156,7 @@ int AUD_read (SWVoiceIn *sw, void *buf,
- return 0;
- }
-
-- return sw->hw->pcm_ops->read(sw, buf, size);
-+ return (sw->hw->pcm_ops->read)(sw, buf, size);
- }
-
- int AUD_get_buffer_size_out (SWVoiceOut *sw)
Home |
Main Index |
Thread Index |
Old Index