From: Peter Rajnoha <prajnoha@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH 3/9] Udev integration: add semaphore IPC to wait for udev rule completion
Date: Wed, 27 May 2009 14:45:27 +0200 [thread overview]
Message-ID: <4A1D35E7.4000404@redhat.com> (raw)
In-Reply-To: <4A1A8CAE.2000803@redhat.com>
We should set the cookie value to 0 if the notification is disabled!
Peter
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index ef249dc..d24584d 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -794,8 +794,10 @@ int dm_udev_notif_sem_open(uint32_t *cookie)
int fd;
uint32_t gen_cookie;
- if (!dm_udev_notif_is_enabled() || !dm_cookie_supported())
+ if (!dm_udev_notif_is_enabled() || !dm_cookie_supported()) {
+ *cookie = 0;
return 1;
+ }
if ((fd = open("/dev/urandom", O_RDONLY)) < 0) {
log_error("Failed to open /dev/urandom to create random cookie value.");
prev parent reply other threads:[~2009-05-27 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 12:18 [PATCH 3/9] Udev integration: add semaphore IPC to wait for udev rule completion Peter Rajnoha
2009-05-27 12:45 ` Peter Rajnoha [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A1D35E7.4000404@redhat.com \
--to=prajnoha@redhat.com \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.