mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-16 00:00:02 +01:00
pci: use linux limits for maximum path length
This commit is contained in:
parent
86bddfa83a
commit
1ce07ceb4c
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue