12 void pb_log(const char *fmt, ...)
17 vfprintf(stderr, fmt, ap);
21 int mount_device(const char *dev_path)
23 printf("[mount] %s\n", dev_path);
27 static int device_idx;
28 static int option_idx;
30 int add_device(const struct device *dev)
32 printf("[dev %2d] id: %s\n", device_idx, dev->id);
33 printf("[dev %2d] name: %s\n", device_idx, dev->name);
34 printf("[dev %2d] description: %s\n", device_idx, dev->description);
35 printf("[dev %2d] boot_image: %s\n", device_idx, dev->icon_file);
43 int add_boot_option(const struct boot_option *opt)
46 fprintf(stderr, "Option (%s) added before device\n",
51 printf("[opt %2d] name: %s\n", option_idx, opt->name);
52 printf("[opt %2d] description: %s\n", option_idx, opt->description);
53 printf("[opt %2d] boot_image: %s\n", option_idx, opt->boot_image_file);
54 printf("[opt %2d] initrd: %s\n", option_idx, opt->initrd_file);
55 printf("[opt %2d] boot_args: %s\n", option_idx, opt->boot_args);
62 enum generic_icon_type guess_device_type(void)
64 return ICON_TYPE_UNKNOWN;
67 int main(int argc, char **argv)
69 char *mountpoint, *dev;
72 fprintf(stderr, "usage: %s <basedir> <devname>\n", argv[0]);
79 set_mount_base(mountpoint);
81 iterate_parsers(dev, mountpoint);