History log of /pciutils/lib/proc.c (Results 1 – 25 of 29)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v3.14.0, v3.13.0, v3.12.0
# 1660c737 29-Mar-2024 Martin Mares <[email protected]>

Use C99 named initializers for struct pci_methods


Revision tags: v3.11.1, v3.11.0
# 30e9f21e 29-Dec-2023 Martin Mares <[email protected]>

Get rid of workarounds for Linux systems without pread/pwrite

Many things have changed since we introduced work-arounds for Linux
systems with missing pread/pwrite in 1999 (if you are curious, it wa

Get rid of workarounds for Linux systems without pread/pwrite

Many things have changed since we introduced work-arounds for Linux
systems with missing pread/pwrite in 1999 (if you are curious, it was
in commit bc6346df8d89ece4814be7dff951ec1a7d259938).

I believe that it is supported by all reasonably recent Linux systems
now. After all, pread() was already defined by POSIX.1-2001.

This should also fix problems with musl libc mentioned in GitHub
issue #158.

show more ...


# 61829219 18-Jun-2023 Martin Mares <[email protected]>

Update license comments and added SPDX license identifiers

Previously, the only information about the specific version of GPL
was present in the README and individual source files mentioned only
GPL

Update license comments and added SPDX license identifiers

Previously, the only information about the specific version of GPL
was present in the README and individual source files mentioned only
GPL alone.

Let us update all copyright comments to explicitly say "GPL v2+"
and also include the machine readable SPDX license identifier.

show more ...


Revision tags: v3.10.0, v3.9.0, v3.8.0
# 1579c198 27-Dec-2021 Pali Rohár <[email protected]>

libpci: proc: Implement support for PCI_FILL_DRIVER

File /proc/bus/pci/devices contains optional driver name in the last 18th field.


Revision tags: v3.7.0, v3.6.4, v3.6.3, v3.6.2, v3.6.1, v3.6.0, v3.5.6, v3.5.5, v3.5.4, v3.5.3, v3.5.2, v3.5.1, v3.5.0, v3.4.1, v3.4.0, v3.3.1, v3.3.0, v3.2.1, v3.2.0, v3.1.10, v3.1.9, v3.1.8, v3.1.7, v3.1.6, v3.1.5, v3.1.4, v3.1.3
# 0208ff05 29-Jun-2009 Martin Mares <[email protected]>

proc: Work around broken /proc/bus/pci/ on some architectures.

Several architectures (e.g., sparc64) use domains in proc directory
names, which is inconsistent, because /proc/bus/pci/devices is stil

proc: Work around broken /proc/bus/pci/ on some architectures.

Several architectures (e.g., sparc64) use domains in proc directory
names, which is inconsistent, because /proc/bus/pci/devices is still
unable to represent domains.

Work around it, so that the proc back-end works at least on single-domain
machines.

Suggested by Matthew Wilcox.

show more ...


Revision tags: v3.1.2, v3.1.1, v3.1.0
# caeac5c3 04-Jan-2009 Yu Zhao <[email protected]>

Fix inconsistent bus centric view between the sysfs and proc methods

The vendor and device IDs may be different when using sysfs and proc
methods with bus centric view enabled. The sysfs method read

Fix inconsistent bus centric view between the sysfs and proc methods

The vendor and device IDs may be different when using sysfs and proc
methods with bus centric view enabled. The sysfs method reads the IDs
from the configuration space rather than uses the values from sysfs
entries. But the proc method always uses values from the proc files.
This fix makes the proc method use the values from the configuration
space too for bus centric view.

Signed-off-by: Yu Zhao <[email protected]>

show more ...


Revision tags: v3.1-alpha3, v3.1-alpha2
# 52c81519 18-Nov-2008 Ben Hutchings <[email protected]>

Add pci_read_vpd() function and internal read_vpd() method

Signed-off-by: Ben Hutchings <[email protected]>


Revision tags: v3.1-alpha1, v3.0.3, v3.0.2, v3.0.1, v3.0.0
# 9ff67879 12-Feb-2008 Martin Mares <[email protected]>

Introduced API for selection of access methods.

Access method names were normalized (they so far served only informational
purposes). Each access method gained a help text.


# cb6ee324 12-Feb-2008 Martin Mares <[email protected]>

Replaced the method_params array by library parameters.

This change is backward incompatible, but hopefully nobody used this
ill-thought interface.


# 489233b4 13-Aug-2004 Martin Mares <[email protected]>

Include file splits and namespace cleanups.

git-archimport-id: [email protected]/pciutils--main--2.2--patch-60


# ec25b52d 05-Jul-2004 Martin Mares <[email protected]>

Merged more PCI Express updates.

git-archimport-id: [email protected]/pciutils--main--2.2--patch-53


# 09817437 27-Jun-2004 Martin Mares <[email protected]>

Added support for 4096-byte extended configuration space.

git-archimport-id: [email protected]/pciutils--main--2.2--patch-50


# 84c8d1bb 27-Dec-2003 Martin Mares <[email protected]>

Preliminary support for PCI domains

git-archimport-id: [email protected]/pciutils--main--2.2--patch-34


# 11f7b31b 27-Dec-2003 Martin Mares <[email protected]>

Added sysfs support

* lib/pci.h (PCIADDR_PORT_FMT): Use %llx instead of %Lx, because the latter
is not supported by all C libraries.

* Makefile: Always enter the lib directory (remember that we don

Added sysfs support

* lib/pci.h (PCIADDR_PORT_FMT): Use %llx instead of %Lx, because the latter
is not supported by all C libraries.

* Makefile: Always enter the lib directory (remember that we don't have
full dependecies for the library in the top-level Makefile; hmmm, another
thing to rewrite some day).

* lib/sysfs.c: Added Linux sysfs access method based on the patch
written by Matthew Wilcox <[email protected]>.

* lib/proc.c: Renamed the access method name from "/proc/bus/pci" to "Linux-proc".

* lib/pread.h: The hacks to support pread on various versions
of Linux libc moved there.

* lib/proc.c (proc_setup): The return value of snprintf() varies
between glibc versions, so we need to check both for a negative
values and for too large values.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-33

show more ...


# 6aea909a 27-Dec-2003 Martin Mares <[email protected]>

Redhat and Mandrake fixes

* lib/proc.c (proc_setup): Increased path name length limit to 1024.
Thanks for Redhat and Mandrake for inspiration.

* lib/configure: Recognize ppc and ppc64, both have 64

Redhat and Mandrake fixes

* lib/proc.c (proc_setup): Increased path name length limit to 1024.
Thanks for Redhat and Mandrake for inspiration.

* lib/configure: Recognize ppc and ppc64, both have 64-bit addresses.
Grabbed from Redhat (Fedora) patches.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-23

show more ...


# 2240db8c 26-Dec-2003 Martin Mares <[email protected]>

Corrected masking of hdr_type

* lib/proc.c (proc_scan): When reading the header type, don't
forget to clear the topmost bit indicating that the device has
multiple functions. Grabbed from Debian pat

Corrected masking of hdr_type

* lib/proc.c (proc_scan): When reading the header type, don't
forget to clear the topmost bit indicating that the device has
multiple functions. Grabbed from Debian patches.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-21

show more ...


# 9739916e 26-Dec-2003 Martin Mares <[email protected]>

Clean up types

* lib/header.h (PCI_*_MASK): Cast to pciaddr_t explicitly.

* lib/pci.h: Types declared in <sys/types.h> should be usable on all
platforms we currently support, so kill the forest of

Clean up types

* lib/header.h (PCI_*_MASK): Cast to pciaddr_t explicitly.

* lib/pci.h: Types declared in <sys/types.h> should be usable on all
platforms we currently support, so kill the forest of #ifdef's and
use them in all cases.

* lib/pci.h: Use ULONG_MASK to decide whether we should use long
or long long to represent a 64-bit address. Killed HAVE_LONG_ADDRESS.
Define format strings for addresses, port numbers and IRQ numbers
directly in pci.h.

* lib/proc.c (proc_scan): Use PCIADDR_T_FMT for scanf'ing addresses.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-17

show more ...


# a832f6f1 26-Dec-2003 Martin Mares <[email protected]>

Fixed UNUSED

Replaced obsolete syntax of __attribute__((unused)) in the middle of
parameter declarations (which is no longer supported by GCC 3.1) by the
current syntax (attribute at the end). Thank

Fixed UNUSED

Replaced obsolete syntax of __attribute__((unused)) in the middle of
parameter declarations (which is no longer supported by GCC 3.1) by the
current syntax (attribute at the end). Thanks to [email protected]
for reporting this problem.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-4

show more ...


# a85769a8 26-Dec-2003 Martin Mares <[email protected]>

Removed $Id$

Removed CVS $Id$ tags from all files.
git-archimport-id: [email protected]/pciutils--main--2.2--patch-3


# 596cc4d2 26-Dec-2002 Martin Mares <[email protected]>

Don't forget to initialize hdrtype.


# a27a33dd 30-Mar-2002 Martin Mares <[email protected]>

Changed all my email addresses to [email protected].


# 14d6c0a3 21-Apr-2000 Martin Mares <[email protected]>

Merged in AIX port.


# 26fe10d2 20-Jan-2000 Martin Mares <[email protected]>

Yet another pread/pwrite fix, this time for libc5.


# 7f5afd83 31-Aug-1999 Eddie C. Dost <[email protected]>

extend buffer size for proc reads, too small on sparc64


# bc6346df 20-Jul-1999 Martin Mares <[email protected]>

Rewrote the pread/pwrite things once again. Use pread and pwrite only when we
are certain it's safe (i.e., glibc 2.1 on all architectures or any libc on a
i386 where we really know how to use syscall

Rewrote the pread/pwrite things once again. Use pread and pwrite only when we
are certain it's safe (i.e., glibc 2.1 on all architectures or any libc on a
i386 where we really know how to use syscalls directly). In all other cases,
emulate it with lseek/read/write.

show more ...


12