1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

pci: use linux limits for maximum path length

This commit is contained in:
Steffen Vogel 2017-06-15 15:07:04 +02:00
parent 86bddfa83a
commit 1ce07ceb4c

View file

@ -8,6 +8,7 @@
#include <libgen.h>
#include <string.h>
#include <unistd.h>
#include <linux/limits.h>
#include "log.h"
#include "utils.h"
@ -20,7 +21,7 @@ int pci_init(struct pci *p)
struct dirent *entry;
DIR *dp;
FILE *f;
char path[512];
char path[PATH_MAX];
int ret;
snprintf(path, sizeof(path), "%s/bus/pci/devices", SYSFS_PATH);