aboutsummaryrefslogtreecommitdiff
path: root/dtc.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2008-05-16 13:21:51 +1000
committerJon Loeliger <jdl@jdl.com>2008-05-19 14:07:40 -0500
commit35aa1a273bc407271f8a1e7b91989b9e6787879c (patch)
tree75b31de3a2abb5f52bb24bb3bd82c598ec688a8f /dtc.h
parent1577696b6d09acafa055957ecc6071b305d6fe9d (diff)
downloaddtc-35aa1a273bc407271f8a1e7b91989b9e6787879c.zip
dtc-35aa1a273bc407271f8a1e7b91989b9e6787879c.tar.gz
dtc-35aa1a273bc407271f8a1e7b91989b9e6787879c.tar.bz2
dtc: Simplify error handling for unparseable input
Currently, main() tests if it got a valid input tree from whichever dt_from_*() function it invoked and if not, die()s. For one thing, this test has, for no good reason, three different ways for those functions to communicate a failure to provide input (bi NULL, bi->dt NULL, or bi->error non-zero). For another, in every case save one, if the dt_from_*() functions are unable to provide input they will immediately die() (with a more specific error message) rather than proceeding to the test in main(). Therefore, this patch removes this test, making the one case that could have triggered it (in dt_from_source()) call die() directly instead. With this change, the error field in struct boot_info is now unused, so remove it. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r--dtc.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/dtc.h b/dtc.h
index d5be1a5..d757242 100644
--- a/dtc.h
+++ b/dtc.h
@@ -232,7 +232,6 @@ struct reserve_info *add_reserve_entry(struct reserve_info *list,
struct boot_info {
struct reserve_info *reservelist;
struct node *dt; /* the device tree */
- int error;
};
struct boot_info *build_boot_info(struct reserve_info *reservelist,