]> git.ozlabs.org Git - petitboot/blob - discover/parser-utils.h
Add DEVPATH to udev_print_event()
[petitboot] / discover / parser-utils.h
1 #ifndef PARSER_UTILS_H
2 #define PARSER_UTILS_H
3
4 #include "pb-protocol/pb-protocol.h"
5 #include "parser.h"
6
7 #define streq(a,b) (!strcasecmp((a),(b)))
8
9 #define artwork_pathname(file) (PKG_SHARE_DIR "/artwork/" file)
10
11 #define define_parser(__name, __parse_fn)                       \
12         struct parser                                                   \
13         __ ## __name ## _parser = {                                     \
14                 .name           = #__name,                              \
15                 .parse          = __parse_fn,                           \
16         };
17
18 void device_add_boot_option(struct device *device,
19                 struct boot_option *boot_option);
20
21 const char *generic_icon_file(enum generic_icon_type type);
22
23 enum generic_icon_type guess_device_type(struct discover_context *ctx);
24
25 #endif /* PARSER_UTILS_H */