uevent_parse - simple C kobject/uevent parser without context
#include "uevent.h"
typedef int uevent_event_cb_t(char *, char *, void *);
typedef int uevent_variable_cb_t(char *, void *);
int uevent_parse(int fd, uevent_event_cb_t *evt_cb , uevent_variable_cb_t *var_cb , void *data);
uevent_parse is a simple C kobject/uevent parser function without context.
It reads and parses data from file descriptor fd. Then it calls back either evt_cb function when an event is met or var_cb function when a variable is met.
test-uevent.c is a good example of how to use the uevent_parse function.
Written by Gaël PORTAY gael.portay@savoirfairelinux.com
Copyright (c) 2017 Gaël PORTAY
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.