summaryrefslogtreecommitdiffstats
path: root/include/blspec.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-07-20 08:31:05 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-07-26 08:31:34 +0200
commitdbc1894b425b587a48a410e9e516c84e6192716b (patch)
treef41a7761d1897a6c37dfbd47884c89b7a98ac80f /include/blspec.h
parent4d85cb974a5f95a98f81a5efd45f9956ca8c4858 (diff)
downloadbarebox-dbc1894b425b587a48a410e9e516c84e6192716b.tar.gz
barebox-dbc1894b425b587a48a410e9e516c84e6192716b.tar.xz
blpec: rename struct lspec -> bootentries
The code in common/boot.c collects the different boot entries in lists of type struct blspec, eventhough many of them may not be bootloader spec entries but for example boot scripts. This is the first step of separating the data structures from boot entries and bootloader spec: As struct blspec is merely a container for collecting boot entries We simply rename struct blspec to struct bootentries. No functional change. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/blspec.h')
-rw-r--r--include/blspec.h38
1 files changed, 19 insertions, 19 deletions
diff --git a/include/blspec.h b/include/blspec.h
index a73dd7250b..cb4adc58e5 100644
--- a/include/blspec.h
+++ b/include/blspec.h
@@ -4,7 +4,7 @@
#include <linux/list.h>
#include <menu.h>
-struct blspec {
+struct bootentries {
struct list_head entries;
struct menu *menu;
};
@@ -27,16 +27,16 @@ const char *blspec_entry_var_get(struct blspec_entry *entry, const char *name);
int blspec_boot(struct blspec_entry *entry, int verbose, int dryrun);
-int blspec_scan_devices(struct blspec *blspec);
+int blspec_scan_devices(struct bootentries *bootentries);
-int blspec_scan_device(struct blspec *blspec, struct device_d *dev);
-int blspec_scan_devicename(struct blspec *blspec, const char *devname);
-int blspec_scan_directory(struct blspec *blspec, const char *root);
+int blspec_scan_device(struct bootentries *bootentries, struct device_d *dev);
+int blspec_scan_devicename(struct bootentries *bootentries, const char *devname);
+int blspec_scan_directory(struct bootentries *bootentries, const char *root);
#define blspec_for_each_entry(blspec, entry) \
list_for_each_entry(entry, &blspec->entries, list)
-static inline struct blspec_entry *blspec_entry_alloc(struct blspec *blspec)
+static inline struct blspec_entry *blspec_entry_alloc(struct bootentries *bootentries)
{
struct blspec_entry *entry;
@@ -44,7 +44,7 @@ static inline struct blspec_entry *blspec_entry_alloc(struct blspec *blspec)
entry->node = of_new_node(NULL, NULL);
- list_add_tail(&entry->list, &blspec->entries);
+ list_add_tail(&entry->list, &bootentries->entries);
return entry;
}
@@ -60,29 +60,29 @@ static inline void blspec_entry_free(struct blspec_entry *entry)
free(entry);
}
-static inline struct blspec *blspec_alloc(void)
+static inline struct bootentries *blspec_alloc(void)
{
- struct blspec *blspec;
+ struct bootentries *bootentries;
- blspec = xzalloc(sizeof(*blspec));
- INIT_LIST_HEAD(&blspec->entries);
+ bootentries = xzalloc(sizeof(*bootentries));
+ INIT_LIST_HEAD(&bootentries->entries);
if (IS_ENABLED(CONFIG_MENU))
- blspec->menu = menu_alloc();
+ bootentries->menu = menu_alloc();
- return blspec;
+ return bootentries;
}
-static inline void blspec_free(struct blspec *blspec)
+static inline void blspec_free(struct bootentries *bootentries)
{
struct blspec_entry *entry, *tmp;
- list_for_each_entry_safe(entry, tmp, &blspec->entries, list)
+ list_for_each_entry_safe(entry, tmp, &bootentries->entries, list)
blspec_entry_free(entry);
- if (blspec->menu)
- free(blspec->menu->display);
- free(blspec->menu);
- free(blspec);
+ if (bootentries->menu)
+ free(bootentries->menu->display);
+ free(bootentries->menu);
+ free(bootentries);
}
#endif /* __LOADER_H__ */