diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2008-05-16 13:22:09 +1000 |
---|---|---|
committer | Jon Loeliger <jdl@jdl.com> | 2008-05-19 14:12:01 -0500 |
commit | a742aade6a28fbebf7a66448b40b983549897253 (patch) | |
tree | 05eb8d2b0dc7caf900ef112ec60b09b4393b51c8 /dtc.h | |
parent | c26015443acaefe0780a3209932e5534cd84a330 (diff) | |
download | dtc-a742aade6a28fbebf7a66448b40b983549897253.zip dtc-a742aade6a28fbebf7a66448b40b983549897253.tar.gz dtc-a742aade6a28fbebf7a66448b40b983549897253.tar.bz2 |
dtc: Make dt_from_blob() open its own input file, like the other input formats
Currently, main() has a variable for the input file. It used to be
that main() would open the input based on command line arguments
before passing it to the dt_from_*() function. However, only
dt_from_blob() uses this. dt_from_source() opens its own file, and
dt_from_fs() interprets the argument as as a directory and does its
own opendir() call.
Furthermore, main() opened the file with dtc_open_file() but closed it
with a direct call to fclose().
Therefore, to improve the interface consistency between the
dt_from_*() functions, make dt_from_blob() open and close its own
files like the other dt_from_*() functions.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'dtc.h')
-rw-r--r-- | dtc.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -248,7 +248,7 @@ void dt_to_blob(FILE *f, struct boot_info *bi, int version, void dt_to_asm(FILE *f, struct boot_info *bi, int version, int boot_cpuid_phys); -struct boot_info *dt_from_blob(FILE *f); +struct boot_info *dt_from_blob(const char *fname); /* Tree source */ |