-static int build_hotplugmsg(struct hotplug_msg **ppmsg, char *action,
- char *devpath, char *subsystem, int seqnum)
-{
- struct hotplug_msg *pmsg;
-
- pmsg = malloc(sizeof(struct hotplug_msg));
- pmsg->mtype = HOTPLUGMSGTYPE;
- pmsg->seqnum = seqnum;
- strncpy(pmsg->action, action, 8);
- strncpy(pmsg->devpath, devpath, 128);
- strncpy(pmsg->subsystem, subsystem, 16);
- *ppmsg = pmsg;
- return sizeof(struct hotplug_msg);
-}
-
-static void free_hotplugmsg(struct hotplug_msg *pmsg)
-{
- free(pmsg);
+ va_start(args, format);
+ vsyslog(priority, format, args);
+ va_end(args);