Update logs.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -16,8 +18,9 @@ __attribute__((stdcall)) uint32_t pci_read(uint32_t bus, uint32_t dev,
|
||||
uint32_t value = 0;
|
||||
sprintf(path, "%s/%4.4x:%2.2x:%2.2x.%u/config", pci_path, 0, bus, dev, fun);
|
||||
int fd = open(path, O_RDONLY);
|
||||
if (!fd) {
|
||||
// TODO: report an error
|
||||
if (fd == -1) {
|
||||
// fprintf(stderr, "[pci] error: failed to open config file '%s': %s\n",
|
||||
// path, strerror(errno));
|
||||
return UINT32_MAX;
|
||||
}
|
||||
lseek(fd, offset, SEEK_SET);
|
||||
|
Reference in New Issue
Block a user