summaryrefslogtreecommitdiffstats
path: root/discover/parser-utils.c
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2009-04-12 15:11:53 +0000
committerJeremy Kerr <jk@ozlabs.org>2009-06-30 15:29:20 +0800
commitd7ce19907ff585e7fb6b950a40bd638d49c96a27 (patch)
tree16ce0e186e9a99a676fc925465823fe744b71d03 /discover/parser-utils.c
parent4414db4f4442009008ef15658bd4df2349c62ec7 (diff)
downloadpetitboot-d7ce19907ff585e7fb6b950a40bd638d49c96a27.zip
petitboot-d7ce19907ff585e7fb6b950a40bd638d49c96a27.tar.gz
Make udev_event a generic event
The struct udev_event can be used as a generic event, so rename it struct event and move it from udev.h into a new file event.h. Also, rename the emums UDEV_ACTION_ADD and UDEV_ACTION_REMOVE to ACTION_UDEV_ADD and ACTION_UDEV_REMOVE. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'discover/parser-utils.c')
-rw-r--r--discover/parser-utils.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/discover/parser-utils.c b/discover/parser-utils.c
index a91c33a..47e30d8 100644
--- a/discover/parser-utils.c
+++ b/discover/parser-utils.c
@@ -5,6 +5,7 @@
#include <talloc/talloc.h>
#include "pb-protocol/pb-protocol.h"
+#include "event.h"
#include "udev.h"
#include "device-handler.h"
#include "parser-utils.h"
@@ -42,13 +43,13 @@ const char *generic_icon_file(enum generic_icon_type type)
enum generic_icon_type guess_device_type(struct discover_context *ctx)
{
- struct udev_event *event;
+ struct event *event;
const char *type, *bus;
event = ctx->event;
- type = udev_event_param(event, "ID_TYPE");
- bus = udev_event_param(event, "ID_BUS");
+ type = event_get_param(event, "ID_TYPE");
+ bus = event_get_param(event, "ID_BUS");
if (type && streq(type, "cd"))
return ICON_TYPE_OPTICAL;
OpenPOWER on IntegriCloud