From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Fri, 15 Oct 2004 22:38:23 +0000 Subject: Re: swich attribute open() to simple stat() Message-Id: <20041015223823.GA973@vrfy.org> List-Id: References: <20041015173619.GD6056@vrfy.org> In-Reply-To: <20041015173619.GD6056@vrfy.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org On Fri, Oct 15, 2004 at 01:55:21PM -0700, Greg KH wrote: > On Fri, Oct 15, 2004 at 07:36:19PM +0200, Kay Sievers wrote: > > Here we switch to a simple stat() to recognize the file creation. This > > will make it possible to wait for files, which are unreadable. > > > > I've switched the timout back to 5 seconds cause the our /class/vc errors > > seems like a bug in the vc layer not a sysfs delay. > > - if (sysfs_get_classdev_attr(class_dev, file) != NULL) { > > + struct stat stats; > > + > > + if (stat(class_dev->path, &stats) = 0) { > > Wait, this patch stops us from looking for "file" which had been set to > the file we wanted to look at, right? Now we are just verifying that > the sysfs _directory_ for the class device is present. > > While this is a good check (and we should do this to verify that the > device hasn't gone away, like in the vcs issue), I don't think this is > what you wanted to do, right? Yeah, you're right, sorry. Kay ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ 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