diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2011-10-14 12:41:46 -0700 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2011-10-19 03:31:21 +0200 |
commit | 76c44aeea997044b85442681094d2315ceb1087b (patch) | |
tree | b47f03e3e77113c7bf373e7c83322692c745cbb6 /util | |
parent | 6a113331339dbddca16a832dca26fa3dd68de48b (diff) | |
download | coreboot-staging-76c44aeea997044b85442681094d2315ceb1087b.zip coreboot-staging-76c44aeea997044b85442681094d2315ceb1087b.tar.gz |
sconfig: check whether component directory actually exists
and add drivers/generic/generic back (empty), since it is used by many
devicetree.cb files.
Without this patch typos in component names in devicetree.cb cause
the component to be silently ignored.
Change-Id: I3cfca2725816f0cd7d72139ae53af815009e8ab4
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: http://review.coreboot.org/270
Tested-by: build bot (Jenkins)
Reviewed-by: Peter Stuge <peter@stuge.se>
Diffstat (limited to 'util')
-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; |