platform/upstream/libpciaccess.git
11 months agoRevert "Package version up to 0.13.3" 73/301773/1 accepted/tizen_9.0_base accepted/tizen_base accepted/tizen_base_asan accepted/tizen_base_riscv tizen_9.0_base tizen_base accepted/tizen/9.0/base/20241030.075508 accepted/tizen/base/20231123.050226 accepted/tizen/base/asan/20240422.015019 accepted/tizen/base/riscv/20231128.013840 tizen_9.0_m2_release
Changyeon Lee [Wed, 22 Nov 2023 10:56:35 +0000 (19:56 +0900)]
Revert "Package version up to 0.13.3"

This reverts commit 6095e5ddbdbba7b8df57f33844ed090e022ec1e6.

Change-Id: I51b81fa8babf5ea0ce10f124ef2bf99facefa3f8

11 months agoPackage version up to 0.13.3 68/301768/1
Changyeon Lee [Wed, 22 Nov 2023 04:22:58 +0000 (13:22 +0900)]
Package version up to 0.13.3

Change-Id: I725db1ab9ab9a4fdf3fafcbe39a341f6c2128706

11 months agoAdd SC(Stack Canary) flags 67/301767/1
Changyeon Lee [Wed, 22 Nov 2023 08:25:08 +0000 (17:25 +0900)]
Add SC(Stack Canary) flags

Change-Id: I94cfd50d012676000f9bb26c5ae1e3400154ecce

11 months agoAdd Partial RELRO flags 66/301766/1
Changyeon Lee [Tue, 21 Nov 2023 03:25:24 +0000 (12:25 +0900)]
Add Partial RELRO flags

Change-Id: Ic0c6642453639e1259faf9a87dcabfe49e036cf3

4 years agoRemoved include sys/io.h for arm builds. 82/221082/1 accepted/tizen_6.0_unified accepted/tizen_6.0_unified_hotfix accepted/tizen_6.5_base accepted/tizen_7.0_base accepted/tizen_7.0_base_hotfix accepted/tizen_base_dev accepted/tizen_unified tizen_6.0 tizen_6.0_hotfix tizen_6.5_base tizen_7.0_base tizen_7.0_base_hotfix accepted/tizen/6.0/unified/20201030.110245 accepted/tizen/6.0/unified/hotfix/20201102.233818 accepted/tizen/6.0/unified/hotfix/20201103.050833 accepted/tizen/6.5/base/20211028.060254 accepted/tizen/7.0/base/20221116.025906 accepted/tizen/7.0/base/hotfix/20221116.055314 accepted/tizen/8.0/base/20231005.044857 accepted/tizen/base/20210825.055336 accepted/tizen/base/20221115.103742 accepted/tizen/base/dev/20230602.080828 accepted/tizen/unified/20191227.142646 submit/tizen/20191227.043226 submit/tizen/20210825.034250 submit/tizen_6.0/20201029.205502 submit/tizen_6.0_hotfix/20201102.192902 submit/tizen_6.0_hotfix/20201103.115102 submit/tizen_6.5_base/20211028.134101 submit/tizen_base/20210825.034748 submit/tizen_base/20210825.035742 tizen_6.0.m2_release tizen_6.5.m2_release tizen_7.0_m2_release tizen_8.0_m2_release
Andrey Kazmin [Tue, 17 Dec 2019 12:28:54 +0000 (15:28 +0300)]
Removed include sys/io.h for arm builds.

IO ports access is no longer supported by glibc for arm.
See glibc commit: 6b33f373c7b9199e00ba5fbafd94ac9bfb4337b1

Change-Id: Icfcf886562b8fc95481ba3597a64604d73029e57
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
4 years agochange the CFLAGS 79/221079/1
SooChan Lim [Fri, 27 Dec 2019 03:45:55 +0000 (12:45 +0900)]
change the CFLAGS

This commit is for avoiding the build-break due to the gcc 6.0
at Tizen 6.0 by -Wall option.
DO NOT inherite the CFLAGS from the global one of the OBS.
libpciaccess just remain because of the build dependency.
Any binary does not use this package.

Change-Id: I7e4af60af6c1c442c9069ac3dc42442df1cc5250

7 years agoSuppress all build warnings
Hoyub Lee [Wed, 11 Oct 2017 10:21:08 +0000 (19:21 +0900)]
Suppress all build warnings

As this is not-modified opensource package, we don't need to fix build warnings.
Therefore, suppress all build warnings by adding '-w' flag.

Change-Id: I79ed43d8397fa21c59046286749b9bca15f50329
Signed-off-by: Hoyub Lee <hoyub.lee@samsung.com>
7 years agorevise installing a license file 66/145366/1 accepted/tizen_4.0_unified accepted/tizen_5.0_unified accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_4.0 tizen_4.0_tv tizen_5.0 tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/4.0/unified/20170901.203257 accepted/tizen/5.0/unified/20181102.025957 accepted/tizen/5.5/unified/20191031.011648 accepted/tizen/5.5/unified/mobile/hotfix/20201027.074148 accepted/tizen/5.5/unified/wearable/hotfix/20201027.100445 accepted/tizen/unified/20170824.050837 submit/tizen/20170823.101627 submit/tizen_4.0/20170830.022557 submit/tizen_4.0/20170901.042111 submit/tizen_5.0/20181101.000007 submit/tizen_5.5/20191031.000007 submit/tizen_5.5_mobile_hotfix/20201026.185107 submit/tizen_5.5_wearable_hotfix/20201026.184307 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m2_release tizen_5.5.m2_release
Youngjae Shin [Tue, 22 Aug 2017 06:43:30 +0000 (15:43 +0900)]
revise installing a license file

Change-Id: I7b90a2eabd3cc4dc4977cb097d7decf127fdbbf0

8 years agoinitialize buf, use integer variable for read 03/77703/1 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable accepted/tizen_3.0_common accepted/tizen_3.0_ivi accepted/tizen_3.0_mobile accepted/tizen_3.0_tv accepted/tizen_3.0_wearable accepted/tizen_common accepted/tizen_ivi accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen_3.0 tizen_3.0.m2 tizen_3.0_tv accepted/tizen/3.0.m2/mobile/20170105.024655 accepted/tizen/3.0.m2/tv/20170105.024838 accepted/tizen/3.0.m2/wearable/20170105.025008 accepted/tizen/3.0/common/20161114.111031 accepted/tizen/3.0/ivi/20161011.050513 accepted/tizen/3.0/mobile/20161015.033626 accepted/tizen/3.0/tv/20161016.004849 accepted/tizen/3.0/wearable/20161015.083153 accepted/tizen/4.0/unified/20170816.013530 accepted/tizen/4.0/unified/20170828.222830 accepted/tizen/common/20160703.130852 accepted/tizen/ivi/20160701.044109 accepted/tizen/mobile/20160701.044022 accepted/tizen/tv/20160701.044042 accepted/tizen/unified/20170309.035957 accepted/tizen/wearable/20160701.043845 submit/tizen/20160701.013624 submit/tizen_3.0.m2/20170104.093753 submit/tizen_3.0_common/20161104.104000 submit/tizen_3.0_ivi/20161010.000004 submit/tizen_3.0_mobile/20161015.000004 submit/tizen_3.0_tv/20161015.000003 submit/tizen_3.0_wearable/20161015.000003 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100006 submit/tizen_common/20160701.180000 submit/tizen_unified/20170308.100414 tizen_4.0.m1_release
Junkyeong Kim [Thu, 30 Jun 2016 13:16:43 +0000 (22:16 +0900)]
initialize buf, use integer variable for read

Change-Id: I6c3971a78581e90122ae6b9a95b6d4f99bde7a46
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
8 years agouse the tizen directory macros at spec file 58/61858/1 accepted/tizen/common/20160315.220654 accepted/tizen/ivi/20160313.114444 accepted/tizen/mobile/20160313.113321 accepted/tizen/tv/20160313.113653 accepted/tizen/wearable/20160313.114054 submit/tizen/20160311.060442
SooChan Lim [Fri, 11 Mar 2016 04:26:45 +0000 (13:26 +0900)]
use the tizen directory macros at spec file

Change-Id: If9018a2f5dfd0847ff787e76e03c564674a130af

9 years agopackaging: Add file .gbs.conf 02/32102/2 sandbox/pcoval/tizen tizen_3.0.2014.q4_common tizen_3.0.2015.q1_common tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_3.0_ivi accepted/tizen/common/20150107.101505 accepted/tizen/ivi/20150113.060206 accepted/tizen/ivi/20160218.025253 accepted/tizen/mobile/20150224.002813 accepted/tizen/tv/20150324.014622 accepted/tizen/wearable/20150129.005744 submit/tizen_common/20150106.131500 submit/tizen_ivi/20150108.111111 submit/tizen_ivi/20150108.222222 submit/tizen_ivi/20150108.333333 submit/tizen_ivi/20160217.000000 submit/tizen_ivi/20160217.000006 submit/tizen_mobile/20150129.000000 submit/tizen_mobile/20150213.000000 submit/tizen_mobile/20150223.000001 submit/tizen_tv/20150320.000002 submit/tizen_tv/20150323.050640 submit/tizen_wearable/20150127.000001 submit/tizen_wearable/20150128.000000 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release tizen_3.0_ivi_release
Nicolas Guyomard [Mon, 10 Nov 2014 13:03:44 +0000 (14:03 +0100)]
packaging: Add file .gbs.conf

Change-Id: I4acb5c61fe9a10f800546c28760dce1344ac82b0
Bug-Tizen: TC-1840
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: cleanup
Philippe Coval [Mon, 15 Dec 2014 14:19:39 +0000 (15:19 +0100)]
packaging: cleanup

Change-Id: I877e7b70faf701b38376de3a527150de1e6dbada
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agopackaging: Bump to version 0.13.2
Nicolas Guyomard [Mon, 10 Nov 2014 10:51:16 +0000 (11:51 +0100)]
packaging: Bump to version 0.13.2

Change-Id: Ia3b70d0e6520fc3f5368b618167c4f3cd7e680b6
Bug-Tizen: TC-1840
Signed-off-by: Nicolas Guyomard <nicolas.guyomard@open.eurogiciel.org>
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>
9 years agoRemove BuildRequire on xorg-macros for Pure Wayland profile.
Ronan Le Martret [Wed, 29 Jan 2014 16:35:53 +0000 (17:35 +0100)]
Remove BuildRequire on xorg-macros for Pure Wayland profile.

Change-Id: I6029af33ffe180ca4d159844e6da95faacbab286
Signed-off-by: Ronan Le Martret <ronan@fridu.net>
9 years agoresetting manifest requested domain to floor
Alexandru Cornea [Mon, 1 Jul 2013 16:00:15 +0000 (19:00 +0300)]
resetting manifest requested domain to floor

9 years agoFixed package groups
Anas Nashif [Tue, 19 Mar 2013 03:29:00 +0000 (20:29 -0700)]
Fixed package groups

9 years agoAdd multi-lib support
Patrick McCarty [Tue, 5 Feb 2013 19:57:24 +0000 (11:57 -0800)]
Add multi-lib support

Change-Id: I0ff782fb6bdd347530a9c0914ffeab8a6112f170

9 years agoAdd multi-lib support
Anas Nashif [Mon, 4 Feb 2013 20:39:29 +0000 (12:39 -0800)]
Add multi-lib support

9 years agofixed packaging
Anas Nashif [Sun, 4 Nov 2012 15:00:23 +0000 (07:00 -0800)]
fixed packaging

9 years agoadd packaging
Anas Nashif [Sun, 4 Nov 2012 14:59:27 +0000 (06:59 -0800)]
add packaging

11 years agolibpciaccess 0.13.2 upstream-git libpciaccess-0.13.2
Alan Coopersmith [Sat, 20 Jul 2013 22:53:42 +0000 (15:53 -0700)]
libpciaccess 0.13.2

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoFix Sun bug #7035791: scanpci should report 64 bit registers
John Martin [Sat, 20 Jul 2013 22:49:05 +0000 (15:49 -0700)]
Fix Sun bug #7035791: scanpci should report 64 bit registers

On a system which has allocated 64-bit device addresses scanpci -v
will show entries such as:
[...]
  BASE0     0xce000000 SIZE 16777216  MEM
  BASE1     0x00000fc1f8000000 SIZE 134217728  MEM64 PREFETCHABLE
  BASE3     0x00000fc1f6000000 SIZE 33554432  MEM64 PREFETCHABLE
[...]
instead of:
[...]
  BASE0     0xce000000 SIZE 16777216  MEM
  BASE1     0xf8000000 SIZE 134217728  MEM PREFETCHABLE
  BASE3     0xf6000000 SIZE 33554432  MEM PREFETCHABLE
[...]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoResync COPYING file with copyrights/licenses from code
Alan Coopersmith [Sat, 20 Jul 2013 22:00:40 +0000 (15:00 -0700)]
Resync COPYING file with copyrights/licenses from code

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agopci_device_solx_devfs_probe: implicit conversion changes signedness warnings
Alan Coopersmith [Sat, 6 Jul 2013 17:09:31 +0000 (10:09 -0700)]
pci_device_solx_devfs_probe: implicit conversion changes signedness warnings

solx_devfs.c:615:32: warning: implicit conversion changes signedness:
 'unsigned long' to 'int' [-Wsign-conversion]
    for (i = 0; i < len; i = i + CELL_NUMS_1275) {
                           ~ ~~^~~~~~~~~~~~~~~~
solx_devfs.c:615:30: warning: implicit conversion changes signedness:
 'int' to 'unsigned long' [-Wsign-conversion]
    for (i = 0; i < len; i = i + CELL_NUMS_1275) {
                             ^ ~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoSolaris: Remove #defines for Ultra 45 southbridge device ids
Alan Coopersmith [Sat, 6 Jul 2013 17:00:44 +0000 (10:00 -0700)]
Solaris: Remove #defines for Ultra 45 southbridge device ids

Workaround for these chipsets was removed in commit d76fb36d9c28be0f7c
with the switch of probing methods from the PCI address poking that upset
them to using the already collected data from the kernel via devinfo,
but the #define to identify them was left behind unused - remove it too.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agopci_device_solx_devfs_read: fix sign conversion/comparison warnings
Alan Coopersmith [Sat, 6 Jul 2013 16:56:46 +0000 (09:56 -0700)]
pci_device_solx_devfs_read: fix sign conversion/comparison warnings

Fixes:
solx_devfs.c:824:19: warning: comparison of integers of different signs: 'int' and 'pciaddr_t' (aka 'unsigned long') [-Wsign-compare]
    for (i = 0; i < size; i += PCITOOL_ACC_ATTR_SIZE(PCITOOL_ACC_ATTR_SIZE_1))
                ~ ^ ~~~~
solx_devfs.c:826:28: warning: implicit conversion changes signedness: 'int' to 'unsigned long' [-Wsign-conversion]
        cfg_prg.offset = offset + i;
                                ~ ^
solx_devfs.c:844:19: warning: implicit conversion changes signedness: 'int' to 'pciaddr_t' (aka 'unsigned long') [-Wsign-conversion]
    *bytes_read = i;
                ~ ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoSupport more pci functions on NetBSD.
Thomas Klausner [Sat, 29 Jun 2013 18:49:54 +0000 (20:49 +0200)]
Support more pci functions on NetBSD.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoFix build on NetBSD-4.
Thomas Klausner [Sat, 29 Jun 2013 18:49:53 +0000 (20:49 +0200)]
Fix build on NetBSD-4.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoEnable boot_vga support only if WSDISPLAYIO_GET_BUSID is defined.
Thomas Klausner [Sat, 29 Jun 2013 18:49:52 +0000 (20:49 +0200)]
Enable boot_vga support only if WSDISPLAYIO_GET_BUSID is defined.

Fixes build on NetBSD-5.

Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agopci_id_file_open: move variable inside the #ifndef that uses it
Alan Coopersmith [Tue, 25 Jun 2013 04:20:27 +0000 (21:20 -0700)]
pci_id_file_open: move variable inside the #ifndef that uses it

Clears up gcc warning on Solaris:
common_device_name.c: In function 'pci_id_file_open':
common_device_name.c:83:17: warning: unused variable 'result' [-Wunused-variable]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoDefine PCI_MATCH_ANY as an unsigned int
Alan Coopersmith [Tue, 25 Jun 2013 04:09:52 +0000 (21:09 -0700)]
Define PCI_MATCH_ANY as an unsigned int

Clears a bunch of clang warnings of the forms:

common_device_name.c:345:23: warning: comparison of integers of different signs:
 'const uint32_t' (aka 'const unsigned int') and 'int' [-Wsign-compare]
    if ( m->vendor_id == PCI_MATCH_ANY ) {
         ~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~

common_device_name.c:498:19: warning: implicit conversion changes signedness:
 'int' to 'uint32_t' (aka 'unsigned int') [-Wsign-conversion]
    m.device_id = PCI_MATCH_ANY;
                ~ ^~~~~~~~~~~~~

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoUpdate NetBSD support.
Thomas Klausner [Tue, 11 Jun 2013 09:46:26 +0000 (11:46 +0200)]
Update NetBSD support.

Signed-off-by: Michael Lorenz <macallan@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoMove 'const' to correct place, so it has meaning.
Thomas Klausner [Tue, 11 Jun 2013 09:45:50 +0000 (11:45 +0200)]
Move 'const' to correct place, so it has meaning.

Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoProtect config.h like usual.
Thomas Klausner [Sun, 2 Jun 2013 20:38:39 +0000 (22:38 +0200)]
Protect config.h like usual.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoBug 63583 - add legacy IO routines for FreeBSD
Alan Coopersmith [Sat, 8 Jun 2013 03:31:37 +0000 (20:31 -0700)]
Bug 63583 - add legacy IO routines for FreeBSD

https://bugs.freedesktop.org/show_bug.cgi?id=63583

Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoSolaris: probe improvement
Henry Zhao [Fri, 11 Jan 2013 01:53:09 +0000 (17:53 -0800)]
Solaris: probe improvement

Remove pcitool dependency in probing phase. Use the data
collected from devinfo tree instead in creating pci file
system.

Signed-off-by: Henry Zhao <henzhao@glory3.(none)>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoSolaris: Add domain support for sparc platform
Henry Zhao [Tue, 18 Dec 2012 23:10:46 +0000 (15:10 -0800)]
Solaris: Add domain support for sparc platform

As a result the code of finding nexus node for a device in sparc is
simplified and made the same as x86.

Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
11 years agoautogen.sh: Implement GNOME Build API
Colin Walters [Wed, 4 Jan 2012 22:37:06 +0000 (17:37 -0500)]
autogen.sh: Implement GNOME Build API

http://people.gnome.org/~walters/docs/build-api.txt

Signed-off-by: Adam Jackson <ajax@redhat.com>
11 years agoconfigure: Remove AM_MAINTAINER_MODE
Adam Jackson [Tue, 15 Jan 2013 19:28:48 +0000 (14:28 -0500)]
configure: Remove AM_MAINTAINER_MODE

Signed-off-by: Adam Jackson <ajax@redhat.com>
11 years agoPCI: set correct mask value when matching for bridges.
Egbert Eich [Mon, 4 Jul 2011 05:38:33 +0000 (07:38 +0200)]
PCI: set correct mask value when matching for bridges.

The mask must not be zero otherwise the matching condition will never
be true: ((val & mask) == set).

Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Guillem Jover <guillem@hadrons.org>
12 years agoscanpci: print meaningful info on BASEROM
Henry Zhao [Sat, 7 Apr 2012 00:26:59 +0000 (17:26 -0700)]
scanpci: print meaningful info on BASEROM

Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agolibpciaccess: sparc rom read fix
Henry Zhao [Fri, 6 Apr 2012 23:52:42 +0000 (16:52 -0700)]
libpciaccess: sparc rom read fix

Get rom address and size from device's "assigned-addresses" property
if they exist.

Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agolibpciaccess: implementation of boot_vga in Solaris
Henry Zhao [Fri, 5 Oct 2012 19:41:36 +0000 (12:41 -0700)]
libpciaccess: implementation of boot_vga in Solaris

Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agolibpciaccess: fix memory usage errors
Mark Logan [Tue, 18 Sep 2012 20:28:18 +0000 (13:28 -0700)]
libpciaccess: fix memory usage errors

This patch fixes memory usage errors that only occur on large SPARC
machines with more than 256 PCI devices. In this case, memory is being
used after it has been freed by calls to both free() and realloc().
This error was introduced by a previous patch:
2011-03-30 Solaris support for multiple PCI segments (domains)

Signed-off-by: Mark Logan <mark.logan@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoImplement legacy io & map for x86 backend
Samuel Thibault [Thu, 31 May 2012 18:00:34 +0000 (20:00 +0200)]
Implement legacy io & map for x86 backend

Add the legacy io and map methods for the x86 backend, using ioperm,
in/out, and the existing mmap method.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
12 years agoSolaris: refactor pci_device_solx_devfs_map_range to reduce code duplication
Alan Coopersmith [Thu, 19 Apr 2012 05:17:54 +0000 (22:17 -0700)]
Solaris: refactor pci_device_solx_devfs_map_range to reduce code duplication

The sparc & x86 cases were doing essentially the same things with
different paths, so make the path setup be inside the platform
specific #ifdefs, make the open, mmap, & error handling common code.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoSolaris: Implement map_legacy & legacy_io functions
Alan Coopersmith [Wed, 18 Apr 2012 22:30:30 +0000 (15:30 -0700)]
Solaris: Implement map_legacy & legacy_io functions

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jay Cotton <jay.cotton@oracle.com>
12 years agoBump to 0.13.1 libpciaccess-0.13.1
Julien Cristau [Mon, 9 Apr 2012 17:05:27 +0000 (19:05 +0200)]
Bump to 0.13.1

Signed-off-by: Julien Cristau <jcristau@debian.org>
12 years agoFix pci_io_handle allocation routines.
Matthieu Herrb [Mon, 2 Apr 2012 06:22:23 +0000 (08:22 +0200)]
Fix pci_io_handle allocation routines.

The previous version of new_io_handle()  would invalidate all previous
allocations when realloc moves the base pointer of the ios array.
Since I cannot figure out where this array is useful, just get rid of
it, providing sound stable memory allocation.

Fixes vgaHWSaveFonts() in 1.12 xserver on OpenBSD, but other
sub-systems relaying on pci_io could be affected too.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Tested-by: Tormod Volden <debian.tormod@gmail.com>
12 years agoFix openbsd_pci.c:pci_device_vgaarb_set_target();
Thordur Bjornsson [Wed, 14 Mar 2012 13:45:52 +0000 (14:45 +0100)]
Fix openbsd_pci.c:pci_device_vgaarb_set_target();

A return (0) got lost, add it back.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Mark Kettenis <mark.kettenis@xs4all.nl>
12 years agolinux: Fix out[bwl] macros on non-I/O architectures
Adam Jackson [Mon, 5 Mar 2012 16:01:01 +0000 (11:01 -0500)]
linux: Fix out[bwl] macros on non-I/O architectures

Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agoMerge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libpciaccess
Adam Jackson [Mon, 5 Mar 2012 16:00:14 +0000 (11:00 -0500)]
Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/lib/libpciaccess

12 years agoconfigure.ac: Bump to 0.13 libpciaccess-0.13
Jeremy Huddleston [Sun, 4 Mar 2012 02:19:11 +0000 (18:19 -0800)]
configure.ac: Bump to 0.13

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoUse O_CLOEXEC for internal file descriptors
Adam Jackson [Mon, 27 Feb 2012 16:19:50 +0000 (11:19 -0500)]
Use O_CLOEXEC for internal file descriptors

Well, almost all of them.  zlib doesn't support "e" in the mode string
in gzopen() though it will silently accept and ignore it, and Solaris appears
not to support "e" in the mode string at all.

Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agolinux: Don't use /dev/port
Adam Jackson [Mon, 27 Feb 2012 15:43:20 +0000 (10:43 -0500)]
linux: Don't use /dev/port

Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
12 years agoUse correct type for pci_id file accessor functions
Mathias Krause [Fri, 24 Feb 2012 08:39:31 +0000 (09:39 +0100)]
Use correct type for pci_id file accessor functions

This fixes the compiler warning of using the wrong type for gzgets() and
gzclose() as they want a gzFile argument, not a pointer to gzFile. The
abstraction layer pci_id_file should just abstract the full type.

Signed-off-by: Mathias Krause <mathias.krause@secunet.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agosolx_devfs.c: fix gcc warnings about casting away const when reading data
Alan Coopersmith [Thu, 9 Feb 2012 06:14:08 +0000 (22:14 -0800)]
solx_devfs.c: fix gcc warnings about casting away const when reading data

solx_devfs.c: In function `pci_device_solx_devfs_write':
solx_devfs.c:1085: warning: cast discards qualifiers from pointer target type
solx_devfs.c:1089: warning: cast discards qualifiers from pointer target type
solx_devfs.c:1093: warning: cast discards qualifiers from pointer target type
solx_devfs.c:1097: warning: cast discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoClose pci.ids file when bailing out because realloc failed
Alan Coopersmith [Thu, 9 Feb 2012 06:08:08 +0000 (22:08 -0800)]
Close pci.ids file when bailing out because realloc failed

Error: File Leak
   Leaked File f
      at line 272 of src/common_device_name.c in function 'populate_vendor'.
        f initialized at line 204 with fopen("/usr/share/hwdata/pci.ids", "r").

[ This bug was found by the Parfait 0.5.0 bug checking tool.
  For more information see http://labs.oracle.com/projects/parfait/ ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoSolaris: reorder functions to remove need for lots of static prototypes
Alan Coopersmith [Thu, 9 Feb 2012 05:40:54 +0000 (21:40 -0800)]
Solaris: reorder functions to remove need for lots of static prototypes

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoOpenBSD: Implement map_legacy and legacy_io
Mark Kettenis [Thu, 29 Dec 2011 20:14:44 +0000 (21:14 +0100)]
OpenBSD: Implement map_legacy and legacy_io

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Matthieu Herrb <matthieu.herrb@laas.fr>
12 years agodelete_io_handle: fix deletion of last handle
Daniel Drake [Fri, 25 Nov 2011 18:28:48 +0000 (12:28 -0600)]
delete_io_handle: fix deletion of last handle

When num_ios goes from 1 to 0, a realloc(ios, 0); call is made.
This is equivalent to free(ios) and NULL is returned.

However, the previous logic in the code incorrectly discards this NULL
return value. When we next call new_io_handle(), realloc(ios, X) is
called with "ios" pointing to freed memory. This causes glibc to abort.

Correct this logic to detect the 1-to-0 case and handle it correctly.
Other cases are unchanged; there is still value in checking the
return value from realloc() as it also returns NULL on error.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoAdd VGA Arbiter support for OpenBSD.
Mark Kettenis [Sun, 6 Nov 2011 17:34:29 +0000 (17:34 +0000)]
Add VGA Arbiter support for OpenBSD.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
12 years agoOpenBSD: Indicate that devices need access to legacy VGA resources.
Mark Kettenis [Sun, 6 Nov 2011 17:32:51 +0000 (17:32 +0000)]
OpenBSD: Indicate that devices need access to legacy VGA resources.

Makes sure xserver disables DRI if the VGA arbiter is in use.

Signed-off-by: Matthieu Herrb <matthieu.herrb@laas.fr>
12 years agoSolaris: improve support for sparc platform
Henry Zhao [Tue, 15 Nov 2011 02:53:21 +0000 (18:53 -0800)]
Solaris: improve support for sparc platform

(1) added prom property retrieval on sparc
(2) added multiple domain support on sparc
(3) use kernel device as mapping device
(4) performance improvements by removing redundant ioctl

Signed-off-by: Henry Zhao <henry.zhao@oracle.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
12 years agoconfigure.ac: Bump to 0.12.902 libpciaccess-0.12.902
Jeremy Huddleston [Wed, 9 Nov 2011 17:27:49 +0000 (09:27 -0800)]
configure.ac: Bump to 0.12.902

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
12 years agoFix some -Wformat errors in scanpci
Jeremy Huddleston [Wed, 9 Nov 2011 17:46:30 +0000 (09:46 -0800)]
Fix some -Wformat errors in scanpci

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agolibpciaccess: close mtrr fd on pci_cleanup
Nithin Nayak Sujir [Mon, 24 Oct 2011 19:15:15 +0000 (12:15 -0700)]
libpciaccess: close mtrr fd on pci_cleanup

Since the fd is not closed, calling pci_system_init and
pci_system_cleanup more than 1024 times results in "too many files open"
error.

Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoSolaris: Give better error on realloc failure
Alan Coopersmith [Wed, 5 Oct 2011 04:46:05 +0000 (21:46 -0700)]
Solaris: Give better error on realloc failure

commit a18460b385ae03 converted from a fixed maximum number of devices
to dynamically growing the list via realloc, but didn't update the
error message shown on failure.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Dirk Wallenstein <halsmit@t-online.de>
Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
13 years agolinux sysfs: Fix read-write access in map_legacy
Jeremy Huddleston [Tue, 11 Oct 2011 17:22:49 +0000 (10:22 -0700)]
linux sysfs: Fix read-write access in map_legacy

O_RDONLY | O_WRONLY != O_RDWR

><

Reported-by: Javier Pello <javier.pello@urjc.es>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoscanpci: Build fix for systems without <err.h>
Jeremy Huddleston [Sun, 9 Oct 2011 10:53:05 +0000 (03:53 -0700)]
scanpci: Build fix for systems without <err.h>

https://bugs.freedesktop.org/show_bug.cgi?id=31133

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoconfigure.ac: Bump version to 0.12.901 libpciaccess-0.12.901
Jeremy Huddleston [Fri, 7 Oct 2011 18:57:26 +0000 (11:57 -0700)]
configure.ac: Bump version to 0.12.901

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoUpdate library version to reflect new API
Jeremy Huddleston [Fri, 7 Oct 2011 18:56:06 +0000 (11:56 -0700)]
Update library version to reflect new API

Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agolinux: Implement map_legacy
Adam Jackson [Tue, 10 May 2011 21:56:35 +0000 (17:56 -0400)]
linux: Implement map_legacy

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoAdd map_legacy interface
Adam Jackson [Tue, 10 May 2011 21:56:34 +0000 (17:56 -0400)]
Add map_legacy interface

This allows platforms to hand back mmaps of the low 1M (ISA) address
space on a per-domain basis.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
13 years agoStrip trailing whitespace
Alan Coopersmith [Sat, 17 Sep 2011 05:11:38 +0000 (22:11 -0700)]
Strip trailing whitespace

Performed with: find * -type f | xargs perl -i -p -e 's{[ \t]+$}{}'
git diff -w & git diff -b show no diffs from this change

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agolinux: Fix a crash in populate_devices
Adam Jackson [Wed, 3 Aug 2011 22:35:11 +0000 (18:35 -0400)]
linux: Fix a crash in populate_devices

If scandir returns -1, the 'devices' array won't be initialized, and
attempting to free() it will crash.

Signed-off-by: Adam Jackson <ajax@redhat.com>
13 years agolinux: Only set errno after an error
Chris Wilson [Sat, 4 Jun 2011 11:30:06 +0000 (12:30 +0100)]
linux: Only set errno after an error

errno is only valid after an error, and was being filled with a garbage
value upon eof.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoSolaris support for multiple PCI segments (domains)
John Martin [Tue, 29 Mar 2011 00:51:19 +0000 (17:51 -0700)]
Solaris support for multiple PCI segments (domains)

1. Removed hardcoded maximum size of 256 PCI devices, which is
too small for large systems.  The number of devices is dynamically
resized as needed.

2. pci_device_solx_devfs_probe() no longer walks the device tree
from the very top ("/") but instead starts at the nexus which
owns the bus.  Performance optimization for systems with multiple
bus nodes (including systems with just one segment/domain).

3. Added support for multiple domains/segments.  Code tested
on kernels with and without multiple segment support so it should
be safe to integrate independent of the kernel version.

Signed-off-by: John Martin <John.M.Martin@Oracle.COM>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
13 years agoconfig: comment, minor upgrade, quote and layout configure.ac
Gaetan Nadon [Thu, 3 Feb 2011 22:38:32 +0000 (17:38 -0500)]
config: comment, minor upgrade, quote and layout configure.ac

Group statements per section as per Autoconf standard layout
Quote statements where appropriate.
Autoconf recommends not using dnl instead of # for comments

Use AC_CONFIG_FILES to replace the deprecated AC_OUTPUT with parameters.
Add AC_CONFIG_SRCDIR([Makefile.am])
Update X.Org util-macros to version 1.8

This helps automated maintenance and release activities.
Details can be found in http://wiki.x.org/wiki/NewModuleGuidelines

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
13 years agolibpciaccess 0.12.1 libpciaccess-0.12.1
Alan Coopersmith [Thu, 3 Feb 2011 04:50:17 +0000 (20:50 -0800)]
libpciaccess 0.12.1

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoconfig: replace deprecated AC_HELP_STRING with AS_HELP_STRING
Gaetan Nadon [Fri, 28 Jan 2011 21:07:07 +0000 (16:07 -0500)]
config: replace deprecated AC_HELP_STRING with AS_HELP_STRING

This silences an Automake warning.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
13 years agoconfig: remove AC_PROG_CC as it overrides AC_PROG_C_C99
Alan Coopersmith [Fri, 14 Jan 2011 06:05:02 +0000 (22:05 -0800)]
config: remove AC_PROG_CC as it overrides AC_PROG_C_C99

XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls
AC_PROG_C_C99. This sets gcc with -std=gnu99.
If AC_PROG_CC macro is called afterwards, it resets CC to gcc.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoconfig: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS
Alan Coopersmith [Fri, 14 Jan 2011 05:58:02 +0000 (21:58 -0800)]
config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS

Regroup AC statements under the Autoconf initialization section.
Regroup AM statements under the Automake initialization section.
Add missing AC_CONFIG_SRCDIR
Replace obsolete argument to AC_OUTPUT with AC_CONFIG_FILES

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
13 years agoFix detection of multi-function cards
Bryce Harrington [Tue, 14 Dec 2010 17:03:48 +0000 (12:03 -0500)]
Fix detection of multi-function cards

Bit 7 of the pci device header type is an indicator of multi-function
devices, so needs to be masked when examining the bridge type.
Thanks go to Chih-Pin Wu for finding the bug and its fix.

https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Bryce Harrington <bryce@canonical.com>
13 years agoRevert "Don't try to use bogus bridge data"
Jesse Barnes [Mon, 6 Dec 2010 20:18:19 +0000 (12:18 -0800)]
Revert "Don't try to use bogus bridge data"

This reverts commit 2bda5b733bb12854760750c08138db95e77aea0c.

It actually conflicts with 9ba94caf57e3a8c3e9c6f3f5f068f4a7a7b3ff9d
which came earlier, but I didn't catch it probably because I did a blind
rebase before pushing.

When reading bridge bus info, we may need to read out the current bridge
info if the PCI bridge private is uninitialized, so remove the check at
the top that would always short circuit the case where the priv was
still 0.

References:
https://bugs.launchpad.net/ubuntu/+source/libpciaccess/+bug/681207.

Reported-by: Bryce Harrington <bryce@canonical.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
13 years agoSun's copyrights belong to Oracle now
Alan Coopersmith [Sun, 21 Nov 2010 19:14:05 +0000 (11:14 -0800)]
Sun's copyrights belong to Oracle now

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
14 years agoconfig: use LDADD to obtain appropriate dependencies
Gaetan Nadon [Fri, 15 Oct 2010 21:34:16 +0000 (17:34 -0400)]
config: use LDADD to obtain appropriate dependencies

In generated scanpci/Makefile, this line is added:
scanpci_DEPENDENCIES = $(top_builddir)/src/libpciaccess.la

If the content of the library changes, the tool will rebuild.
When scanpci was in the same directory as the library, the .la file was used.
This will also ensure the "installed" pciaccess library is not used.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoinclude: add a Makefile to install and distribute header file
Gaetan Nadon [Sun, 26 Sep 2010 18:57:19 +0000 (14:57 -0400)]
include: add a Makefile to install and distribute header file

Makefiles are simpler when they only handle what is in their
directory.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoconfig: replace INCLUDES, which is deprecated, with AM_CPPFLAGS
Gaetan Nadon [Sun, 26 Sep 2010 18:42:50 +0000 (14:42 -0400)]
config: replace INCLUDES, which is deprecated, with AM_CPPFLAGS

Fixes an Automake warning.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoconfig: provide a makefile for scanpci man pages
Gaetan Nadon [Sun, 22 Aug 2010 12:10:23 +0000 (08:10 -0400)]
config: provide a makefile for scanpci man pages

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoscanpci.c: remove offending whitespace as reported by git diff
Gaetan Nadon [Sun, 26 Sep 2010 12:39:57 +0000 (08:39 -0400)]
scanpci.c: remove offending whitespace as reported by git diff

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoconfig: provide a makefile for scanpci dev tool
Gaetan Nadon [Sun, 22 Aug 2010 12:10:23 +0000 (08:10 -0400)]
config: provide a makefile for scanpci dev tool

No function changes.

Note that automake generates a wrapper script if libpciaccess
is not installed at configuration time, which is the most common case.

If it is installed at configuration time, you get an executable.

The makefile build order ensures the lib is build before scanpci.

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agoconfig: upgrade AC_DEFINE_DIR to AX_DEFINE_DIR
Gaetan Nadon [Sat, 21 Aug 2010 23:54:04 +0000 (19:54 -0400)]
config: upgrade AC_DEFINE_DIR to AX_DEFINE_DIR

Use the latest version now hosted by GNU.
The renaming protects Autoconf namespace.
There is no functional change in the macro.

Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
14 years agolibpciaccess 0.12.0 - bump version for release libpciaccess-0.12.0
Dave Airlie [Tue, 20 Jul 2010 23:39:26 +0000 (09:39 +1000)]
libpciaccess 0.12.0 - bump version for release

14 years agoFix long standing MTRR bug.
Thomas Hellstrom [Tue, 20 Jul 2010 20:14:22 +0000 (22:14 +0200)]
Fix long standing MTRR bug.

Add an include that makes the file common_vgaarb.c see the same
struct pci_system as the file linux_sysfs.c.

Without this fix, on a MTRR system, the vgaarb_fd member
would overwrite the mtrr_fd member and cause the MTRR_IOC_ADD_ENTRY call
to be issued to the incorrect device causing the infamous
"Inappropriate ioctl for device (25)" error.

This error would cause MTRR setup to fail on all systems relying on it
and is severe enough to warrant a new release.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agopciaccess: fix use after free.
Dave Airlie [Mon, 12 Jul 2010 03:09:33 +0000 (13:09 +1000)]
pciaccess: fix use after free.

Using the pointer passed to realloc earlier isn't a recipe for success.

Signed-off-by: Dave Airlie <airlied@redhat.com>
14 years agoLet libtool handle library flags for scanpci on Solaris
Alan Coopersmith [Sat, 19 Jun 2010 17:36:24 +0000 (10:36 -0700)]
Let libtool handle library flags for scanpci on Solaris

Stop hardcoding -ldevinfo since configure/libtool already know to add it
for static linking, and ELF dependencies handle it for dynamic linking

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
14 years agovgaarb: read back vga count when setting new decoding
Tiago Vignatti [Sat, 22 May 2010 15:23:33 +0000 (18:23 +0300)]
vgaarb: read back vga count when setting new decoding

Decode kernel operation can also change vga refcount, so we need to read back
the information when calling it.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
14 years agovgaarb: decode should send new information to the kernel
Tiago Vignatti [Wed, 12 May 2010 10:12:47 +0000 (13:12 +0300)]
vgaarb: decode should send new information to the kernel

This was introduced in e360c11c.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
14 years agoDelay allocation of agp_info so we don't leak it on prior errors
Alan Coopersmith [Fri, 4 Jun 2010 23:58:56 +0000 (16:58 -0700)]
Delay allocation of agp_info so we don't leak it on prior errors

   Memory leak of pointer 'agp_info'
        at line 119 of src/common_capability.c in function 'pci_fill_capabilities_generic'.
          'agp_info' allocated at line 107 with calloc(1, 12).
          'agp_info' leaks when err != 0 at line 118.
        at line 124 of src/common_capability.c in function 'pci_fill_capabilities_generic'.
          'agp_info' allocated at line 107 with calloc(1, 12).
          'agp_info' leaks when err != 0 at line 123.

[ This bug was found by the Parfait bug checking tool.
  For more information see http://research.sun.com/projects/parfait ]

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>