Skip to content

Commit 2144f0c

Browse files
author
jperkin
committed
Revert upstream Oracle patch which breaks illumos and probably older SunOS
releases. Bump PKGREVISION.
1 parent 78d7692 commit 2144f0c

3 files changed

Lines changed: 96 additions & 2 deletions

File tree

sysutils/libpciaccess/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# $NetBSD: Makefile,v 1.27 2017/04/07 08:53:28 wiz Exp $
1+
# $NetBSD: Makefile,v 1.28 2017/07/07 10:13:57 jperkin Exp $
22

33
DISTNAME= libpciaccess-0.13.5
4+
PKGREVISION= 1
45
CATEGORIES= sysutils x11
56
MASTER_SITES= ${MASTER_SITE_XORG:=lib/}
67
EXTRACT_SUFX= .tar.bz2

sysutils/libpciaccess/distinfo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
$NetBSD: distinfo,v 1.33 2017/04/07 08:53:28 wiz Exp $
1+
$NetBSD: distinfo,v 1.34 2017/07/07 10:13:57 jperkin Exp $
22

33
SHA1 (libpciaccess-0.13.5.tar.bz2) = ea98c13623e218359ca6d9af9ab9aa4780201a5b
44
RMD160 (libpciaccess-0.13.5.tar.bz2) = a691b7213132d4e50a49b650524937f2a7271d0b
55
SHA512 (libpciaccess-0.13.5.tar.bz2) = 4b77aa66b3429fd5f9bff0408b0624305e766bf209f3fa2a0a9024df55bf87ca68f9a5aa34f97ffe131997e0669c65cf542210cf308c0de09842424968c5a159
66
Size (libpciaccess-0.13.5.tar.bz2) = 381729 bytes
77
SHA1 (patch-src_common__interface.c) = cac11689864531fa4721e09374ead730bd1691a6
8+
SHA1 (patch-src_solx__devfs.c) = 18bfd9899da30061199232ae2ebc5ead8d4d7a47
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
$NetBSD: patch-src_solx__devfs.c,v 1.5 2017/07/07 10:13:57 jperkin Exp $
2+
3+
Revert upstream commit fe556c48dad96717b0ba71d489575c6b90b46448 which breaks
4+
device lookup completely on illumos.
5+
6+
--- src/solx_devfs.c.orig 2017-04-04 13:46:41.000000000 +0000
7+
+++ src/solx_devfs.c
8+
@@ -1,6 +1,6 @@
9+
/*
10+
* (C) Copyright IBM Corporation 2006
11+
- * Copyright (c) 2007, 2009, 2011, 2012, 2016 Oracle and/or its affiliates.
12+
+ * Copyright (c) 2007, 2009, 2011, 2012, 2015 Oracle and/or its affiliates.
13+
* All Rights Reserved.
14+
*
15+
* Permission is hereby granted, free of charge, to any person obtaining a
16+
@@ -65,7 +65,7 @@ typedef struct nexus {
17+
int first_bus;
18+
int last_bus;
19+
int domain;
20+
- char *path; /* for open */
21+
+ char *path; /* for errors/debugging; fd is all we need */
22+
char *dev_path;
23+
struct nexus *next;
24+
} nexus_t;
25+
@@ -297,6 +297,7 @@ probe_nexus_node(di_node_t di_node, di_m
26+
int pci_node = 0;
27+
int first_bus = 0, last_bus = PCI_REG_BUS_G(PCI_REG_BUS_M);
28+
int domain = 0;
29+
+ di_node_t rnode = DI_NODE_NIL;
30+
#ifdef __sparc
31+
int bus_range_found = 0;
32+
int device_type_found = 0;
33+
@@ -422,12 +423,21 @@ probe_nexus_node(di_node_t di_node, di_m
34+
nexus->dev_path = strdup(nexus_dev_path);
35+
di_devfs_path_free(nexus_dev_path);
36+
37+
+ if ((rnode = di_init(nexus->dev_path, DINFOCPYALL)) == DI_NODE_NIL) {
38+
+ (void) fprintf(stderr, "di_init failed: %s\n", strerror(errno));
39+
+ close(fd);
40+
+ free(nexus->path);
41+
+ free(nexus->dev_path);
42+
+ free(nexus);
43+
+ return (DI_WALK_TERMINATE);
44+
+ }
45+
+
46+
/* Walk through devices under the rnode */
47+
args.pinfo = pinfo;
48+
args.nexus = nexus;
49+
args.ret = 0;
50+
51+
- (void) di_walk_node(di_node, DI_WALK_CLDFIRST, (void *)&args, probe_device_node);
52+
+ (void) di_walk_node(rnode, DI_WALK_CLDFIRST, (void *)&args, probe_device_node);
53+
54+
close(fd);
55+
56+
@@ -435,6 +445,7 @@ probe_nexus_node(di_node_t di_node, di_m
57+
free(nexus->path);
58+
free(nexus->dev_path);
59+
free(nexus);
60+
+ di_fini(rnode);
61+
return (DI_WALK_TERMINATE);
62+
}
63+
64+
@@ -446,6 +457,10 @@ probe_nexus_node(di_node_t di_node, di_m
65+
free(nexus);
66+
}
67+
68+
+ if (rnode != DI_NODE_NIL) {
69+
+ di_fini(rnode);
70+
+ }
71+
+
72+
return DI_WALK_CONTINUE;
73+
}
74+
75+
@@ -538,7 +553,7 @@ pci_device_solx_devfs_probe( struct pci_
76+
* starting to find if it is MEM/MEM64/IO
77+
* using libdevinfo
78+
*/
79+
- if ((rnode = di_init(nexus->dev_path, DINFOCACHE)) == DI_NODE_NIL) {
80+
+ if ((rnode = di_init(nexus->dev_path, DINFOCPYALL)) == DI_NODE_NIL) {
81+
err = errno;
82+
(void) fprintf(stderr, "di_init failed: %s\n", strerror(errno));
83+
} else {
84+
@@ -1070,7 +1085,7 @@ pci_system_solx_devfs_create( void )
85+
return 0;
86+
}
87+
88+
- if ((di_node = di_init("/", DINFOCACHE)) == DI_NODE_NIL) {
89+
+ if ((di_node = di_init("/", DINFOCPYALL)) == DI_NODE_NIL) {
90+
err = errno;
91+
(void) fprintf(stderr, "di_init() failed: %s\n",
92+
strerror(errno));

0 commit comments

Comments
 (0)