diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:06:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-20 04:06:28 +0000 |
commit | 43e241fbda8e6c137142af8d08abf9f8d16c5145 (patch) | |
tree | 1e72ad25ef4dfbbd381d4ef859729ebc7c5d6c3e /lib/sysfs.c | |
parent | Adding debian version 1:3.12.0-1. (diff) | |
download | pciutils-43e241fbda8e6c137142af8d08abf9f8d16c5145.tar.xz pciutils-43e241fbda8e6c137142af8d08abf9f8d16c5145.zip |
Merging upstream version 1:3.13.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/sysfs.c')
-rw-r--r-- | lib/sysfs.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/sysfs.c b/lib/sysfs.c index 0e763dc..7dedc0b 100644 --- a/lib/sysfs.c +++ b/lib/sysfs.c @@ -2,7 +2,7 @@ * The PCI Library -- Configuration Access via /sys/bus/pci * * Copyright (c) 2003 Matthew Wilcox <matthew@wil.cx> - * Copyright (c) 1997--2023 Martin Mares <mj@ucw.cz> + * Copyright (c) 1997--2024 Martin Mares <mj@ucw.cz> * * Can be freely distributed and used under the terms of the GNU GPL v2+. * @@ -19,6 +19,7 @@ #include <errno.h> #include <dirent.h> #include <fcntl.h> +#include <libgen.h> #include <sys/types.h> #include "internal.h" @@ -483,6 +484,17 @@ sysfs_fill_info(struct pci_dev *d, unsigned int flags) clear_fill(d, PCI_FILL_DRIVER); } + if (want_fill(d, flags, PCI_FILL_RCD_LNK)) + { + char buf[OBJBUFSIZE]; + if (sysfs_get_string(d, "rcd_link_cap", buf, 0)) + d->rcd_link_cap = strtoul(buf, NULL, 16); + if (sysfs_get_string(d, "rcd_link_ctrl", buf, 0)) + d->rcd_link_ctrl = strtoul(buf, NULL, 16); + if (sysfs_get_string(d, "rcd_link_status", buf, 0)) + d->rcd_link_status = strtoul(buf, NULL, 16); + } + pci_generic_fill_info(d, flags); } |