From 90c210eb6bfc2ae294202fffb080315f3c47a57b Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Fri, 23 Jan 2004 04:01:09 -0800 Subject: [PATCH] fix udevd exec Sorry, some code is missing. Here is a fix to make the exec functional. --- udevsend.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'udevsend.c') diff --git a/udevsend.c b/udevsend.c index 1a897451c0..748c8f2217 100644 --- a/udevsend.c +++ b/udevsend.c @@ -117,15 +117,16 @@ int main(int argc, char* argv[]) } seq = atoi(seqnum); + /* create ipc message queue or get id of our existing one */ key = ftok(DEFAULT_EXEC_PROGRAM, IPC_KEY_ID); size = build_hotplugmsg( (struct hotplug_msg**) &pmsg, action, devpath, subsystem, seq); msgid = msgget(key, IPC_CREAT); if (msgid == -1) { - dbg("open ipc queue error"); + dbg("error open ipc queue"); goto exit; } - /* get state of queue */ + /* get state of ipc queue */ retval = msgctl(msgid, IPC_STAT, &msg_queue); if (retval == -1) { dbg("error getting info on ipc queue"); @@ -134,10 +135,11 @@ int main(int argc, char* argv[]) if (msg_queue.msg_qnum > 0) dbg("%li messages already in the ipc queue", msg_queue.msg_qnum); + /* send ipc message to the daemon */ retval = msgsnd(msgid, pmsg, size, 0); free_hotplugmsg( (struct hotplug_msg*) pmsg); if (retval == -1) { - dbg("send ipc message error"); + dbg("error sending ipc message"); goto exit; } return 0; -- cgit v1.2.3-54-g00ecf