mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
nlsysevent: add default command to the events
This commit is contained in:
parent
0bcb3ebd1f
commit
9908461193
|
@ -74,7 +74,7 @@ sysevent_write(struct sysevent_group *se, const char *subsystem, const char *typ
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ghdr->version = 0;
|
ghdr->version = 0;
|
||||||
ghdr->cmd = 0;
|
ghdr->cmd = NLSE_CMD_NEWEVENT;
|
||||||
ghdr->reserved = 0;
|
ghdr->reserved = 0;
|
||||||
nlattr_add_string(&nw, NLSE_ATTR_SYSTEM, se->name);
|
nlattr_add_string(&nw, NLSE_ATTR_SYSTEM, se->name);
|
||||||
nlattr_add_string(&nw, NLSE_ATTR_SUBSYSTEM, subsystem);
|
nlattr_add_string(&nw, NLSE_ATTR_SUBSYSTEM, subsystem);
|
||||||
|
|
|
@ -30,11 +30,20 @@
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NLSE_ATTR_UNSPEC = 0,
|
NLSE_ATTR_UNSPEC = 0,
|
||||||
NLSE_ATTR_SYSTEM = 1,
|
NLSE_ATTR_SYSTEM = 1, /* string reporting the system name */
|
||||||
NLSE_ATTR_SUBSYSTEM = 2,
|
NLSE_ATTR_SUBSYSTEM = 2, /* string reporting the subsystem name */
|
||||||
NLSE_ATTR_TYPE = 3,
|
NLSE_ATTR_TYPE = 3, /* string reporting the type if the event */
|
||||||
NLSE_ATTR_DATA = 4,
|
NLSE_ATTR_DATA = 4, /* string reporting the extra data (can be null) */
|
||||||
__NLSE_ATTR_MAX,
|
__NLSE_ATTR_MAX,
|
||||||
};
|
};
|
||||||
#define NLSE_ATTR_MAX (__NLSE_ATTR_MAX -1)
|
#define NLSE_ATTR_MAX (__NLSE_ATTR_MAX -1)
|
||||||
|
|
||||||
|
/* commands */
|
||||||
|
enum {
|
||||||
|
NLSE_CMD_UNSPEC = 0,
|
||||||
|
NLSE_CMD_NEWEVENT = 1,
|
||||||
|
__NLSE_CMD_MAX,
|
||||||
|
};
|
||||||
|
#define NLSE_CMD_MAX (__NLSE_CMD_MAX - 1)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue