pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/x11/libdrm
Module Name: pkgsrc
Committed By: tnn
Date: Sun Jan 6 02:23:00 UTC 2019
Modified Files:
pkgsrc/x11/libdrm: Makefile distinfo
pkgsrc/x11/libdrm/patches: patch-xf86drm.c
Log Message:
libdrm: don't return random values to the caller - don't leak fd's
xsrc/external/mit/libdrm/dist/xf86drm.c 1.21
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.87 -r1.88 pkgsrc/x11/libdrm/Makefile
cvs rdiff -u -r1.88 -r1.89 pkgsrc/x11/libdrm/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/x11/libdrm/patches/patch-xf86drm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/x11/libdrm/Makefile
diff -u pkgsrc/x11/libdrm/Makefile:1.87 pkgsrc/x11/libdrm/Makefile:1.88
--- pkgsrc/x11/libdrm/Makefile:1.87 Thu Oct 18 17:12:55 2018
+++ pkgsrc/x11/libdrm/Makefile Sun Jan 6 02:23:00 2019
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.87 2018/10/18 17:12:55 wiz Exp $
+# $NetBSD: Makefile,v 1.88 2019/01/06 02:23:00 tnn Exp $
DISTNAME= libdrm-2.4.96
+PKGREVISION= 1
CATEGORIES= x11 graphics
MASTER_SITES= http://dri.freedesktop.org/libdrm/
EXTRACT_SUFX= .tar.bz2
Index: pkgsrc/x11/libdrm/distinfo
diff -u pkgsrc/x11/libdrm/distinfo:1.88 pkgsrc/x11/libdrm/distinfo:1.89
--- pkgsrc/x11/libdrm/distinfo:1.88 Tue Dec 25 01:13:57 2018
+++ pkgsrc/x11/libdrm/distinfo Sun Jan 6 02:23:00 2019
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.88 2018/12/25 01:13:57 sevan Exp $
+$NetBSD: distinfo,v 1.89 2019/01/06 02:23:00 tnn Exp $
SHA1 (libdrm-2.4.96.tar.bz2) = 51eb4c248a437b3f200bd1cd84461d3e0b60d71e
RMD160 (libdrm-2.4.96.tar.bz2) = 8e13f0edf61bb0b59aaaf3cdbaadf20916782fe8
@@ -10,6 +10,6 @@ SHA1 (patch-libkms_vmwgfx.c) = d2204c0b7
SHA1 (patch-libsync.h) = 51623bae547e7a0c3e41fa282964b2361b1c34ab
SHA1 (patch-radeon_radeon__bo__gem.c) = 4924fde172b2a2a713d47bf7b60a6b52851d7a8f
SHA1 (patch-radeon_radeon__cs__gem.c) = 516b5dd6408c10a4f33f2815b3719e34a16d863a
-SHA1 (patch-xf86drm.c) = 9a76f433c3b4688575cd60362396fb74d3294a4b
+SHA1 (patch-xf86drm.c) = ae371519320eb513f38d6856ad617dff5d05278b
SHA1 (patch-xf86drmMode.c) = 7a0d8ea4a0110b295d8cb4fe870ee523d420ea6b
SHA1 (patch-xf86drmMode.h) = a28b02887389be8670193c119f711901af61a6b2
Index: pkgsrc/x11/libdrm/patches/patch-xf86drm.c
diff -u pkgsrc/x11/libdrm/patches/patch-xf86drm.c:1.2 pkgsrc/x11/libdrm/patches/patch-xf86drm.c:1.3
--- pkgsrc/x11/libdrm/patches/patch-xf86drm.c:1.2 Fri Oct 5 12:57:20 2018
+++ pkgsrc/x11/libdrm/patches/patch-xf86drm.c Sun Jan 6 02:23:00 2019
@@ -1,8 +1,8 @@
-$NetBSD: patch-xf86drm.c,v 1.2 2018/10/05 12:57:20 wiz Exp $
+$NetBSD: patch-xf86drm.c,v 1.3 2019/01/06 02:23:00 tnn Exp $
Implement drmParseSubsystemType, drmParsePciBusInfo for NetBSD
---- xf86drm.c.orig 2018-10-04 14:50:03.000000000 +0000
+--- xf86drm.c.orig 2018-10-16 14:49:03.000000000 +0000
+++ xf86drm.c
@@ -84,7 +84,10 @@
#endif
@@ -16,7 +16,7 @@ Implement drmParseSubsystemType, drmPars
#endif
#ifdef __OpenBSD__
-@@ -2997,6 +3000,65 @@ static int drmParseSubsystemType(int maj
+@@ -3011,6 +3014,65 @@ static int drmParseSubsystemType(int maj
return DRM_BUS_VIRTIO;
return -EINVAL;
@@ -82,7 +82,7 @@ Implement drmParseSubsystemType, drmPars
#elif defined(__OpenBSD__)
return DRM_BUS_PCI;
#else
-@@ -3046,6 +3108,73 @@ static int drmParsePciBusInfo(int maj, i
+@@ -3060,6 +3122,73 @@ static int drmParsePciBusInfo(int maj, i
info->func = func;
return 0;
@@ -156,7 +156,7 @@ Implement drmParseSubsystemType, drmPars
#elif defined(__OpenBSD__)
struct drm_pciinfo pinfo;
int fd, type;
-@@ -3213,6 +3342,41 @@ static int drmParsePciDeviceInfo(int maj
+@@ -3227,6 +3356,48 @@ static int drmParsePciDeviceInfo(int maj
return parse_config_sysfs_file(maj, min, device);
return 0;
@@ -179,22 +179,29 @@ Implement drmParseSubsystemType, drmPars
+ if ((pcifd = open(fname, O_RDONLY)) == -1)
+ return -errno;
+
++ ret = -1;
+ /* Read the id and class pci config registers. */
+ if (pcibus_conf_read(pcifd, businfo.bus, businfo.dev, businfo.func,
+ PCI_ID_REG, &id) == -1)
-+ return -errno;
++ goto out;
+ if (pcibus_conf_read(pcifd, businfo.bus, businfo.dev, businfo.func,
+ PCI_CLASS_REG, &class) == -1)
-+ return -errno;
++ goto out;
+ if (pcibus_conf_read(pcifd, businfo.bus, businfo.dev, businfo.func,
+ PCI_SUBSYS_ID_REG, &subsys) == -1)
-+ return -errno;
++ goto out;
+
++ ret = 0;
+ device->vendor_id = PCI_VENDOR(id);
+ device->device_id = PCI_PRODUCT(id);
+ device->subvendor_id = PCI_SUBSYS_VENDOR(subsys);
+ device->subdevice_id = PCI_SUBSYS_ID(subsys);
+ device->revision_id = PCI_REVISION(class);
++out:
++ if (ret == -1)
++ ret = -errno;
++ close(pcifd);
++ return ret;
#elif defined(__OpenBSD__)
struct drm_pciinfo pinfo;
int fd, type;
Home |
Main Index |
Thread Index |
Old Index