diff options
Diffstat (limited to 'util/sconfig')
-rwxr-xr-x | util/sconfig/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index c3448f3..dab04db 100755 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -131,6 +131,13 @@ struct device *new_chip(struct device *parent, struct device *bus, char *path) { struct stat st; char *chip_h = malloc(strlen(path)+12); + sprintf(chip_h, "src/%s", path); + if ((stat(chip_h, &st) == -1) && (errno == ENOENT)) { + fprintf(stderr, "ERROR: Chip component %s does not exist.\n", + path); + exit(1); + } + sprintf(chip_h, "src/%s/chip.h", path); if ((stat(chip_h, &st) == -1) && (errno == ENOENT)) new_chip->chiph_exists = 0; |