summaryrefslogtreecommitdiffstats
path: root/util/sconfig
diff options
context:
space:
mode:
Diffstat (limited to 'util/sconfig')
-rwxr-xr-xutil/sconfig/main.c7
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;
OpenPOWER on IntegriCloud