From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Sat, 06 Aug 2005 00:39:52 +0000 Subject: Re: move udev-rules parsing into the daemon Message-Id: <20050806003952.GD5370@kroah.com> List-Id: References: <20050731004227.GA26803@vrfy.org> In-Reply-To: <20050731004227.GA26803@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Tue, Aug 02, 2005 at 04:42:44AM +0200, Kay Sievers wrote: > +static int watch_directory(const char *dir) > +{ > + int fd; > + > + fd = open(dir, O_RDONLY); > + if (fd < 0) { > + err("could not open '%s' to watch it", dir); > + return -1; > + } > + if (fcntl(fd, F_NOTIFY, DN_MODIFY | DN_CREATE | DN_DELETE | DN_MULTISHOT) = -1) { > + err("could not set dnotify on '%s'", dir); > + return -1; > + close(fd); > + } > + > + return 0; > +} Why dnotify and not inotify? thanks, greg k-h ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel