diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2009-01-02 15:30:29 +0900 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2009-01-02 15:30:29 +0900 |
commit | b118597194815910897ccf86d77b8b5a066adf5a (patch) | |
tree | 1c1579a5ca70cdcf7722796a9c04792b9ebea968 /ui | |
parent | 2f018d544eb544e609018f3d95eb653c7cd6fff0 (diff) | |
download | petitboot-b118597194815910897ccf86d77b8b5a066adf5a.zip petitboot-b118597194815910897ccf86d77b8b5a066adf5a.tar.gz |
Use a list for device->boot_options
Makes adding and removing options easier for parsers.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/test/pb-test.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/test/pb-test.c b/ui/test/pb-test.c index e800498..5f021ff 100644 --- a/ui/test/pb-test.c +++ b/ui/test/pb-test.c @@ -5,7 +5,7 @@ static int print_device_add(struct device *device) { - int i; + struct boot_option *opt; printf("new device:\n"); printf("\tid: %s\n", device->id); @@ -13,9 +13,8 @@ static int print_device_add(struct device *device) printf("\tdesc: %s\n", device->description); printf("\ticon: %s\n", device->icon_file); - printf("\t%d boot options:\n", device->n_options); - for (i = 0; i < device->n_options; i++) { - struct boot_option *opt = &device->options[i]; + printf("\tboot options:\n"); + list_for_each_entry(&device->boot_options, opt, list) { printf("\t\tid: %s\n", opt->id); printf("\t\tname: %s\n", opt->name); printf("\t\tdesc: %s\n", opt->description); |