* [udev] DEVNAME on device removal
@ 2004-11-22 19:38 Sjoerd Simons
2004-11-22 19:55 ` Kay Sievers
2004-11-23 7:50 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Sjoerd Simons @ 2004-11-22 19:38 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 798 bytes --]
Hi,
I just noticed that the DEVNAME enviroment variable isn't being set anymore
in udev 0.046 on device removal, while it was being set in 0.042. We're using
the property tto do umount -l <devices> when a block device is removed. Afaik
there is no other way to associate a device with it's DEVNAME on removal ?
Also are there cases where doing umount -l on the removed devices is wrong?
I guess the device is gone, so there is no sense in keeping it mounted (it's
not like the filesystem is gonna come back in a sane state again)..
Attached (trivial) patch brings back the DEVNAME variable on device removal.
Sjoerd
--
The optimist thinks that this is the best of all possible worlds,
and the pessimist knows it.
-- J. Robert Oppenheimer, "Bulletin of Atomic Scientists"
[-- Attachment #2: devname.patch --]
[-- Type: text/plain, Size: 449 bytes --]
diff -Naur udev-046.orig/udev.c udev-046/udev.c
--- udev-046.orig/udev.c 2004-11-18 20:39:15.000000000 +0100
+++ udev-046/udev.c 2004-11-22 18:43:58.000000000 +0100
@@ -179,6 +179,10 @@
/* get node from db, delete it*/
retval = udev_remove_device(&udev);
+ /* Set the DEVNAME if known */
+ if (udev.devname[0] != '\0') {
+ setenv("DEVNAME", udev.devname, 1);
+ }
/* run scripts */
dev_d_execute(&udev, DEVD_DIR, DEVD_SUFFIX);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [udev] DEVNAME on device removal
2004-11-22 19:38 [udev] DEVNAME on device removal Sjoerd Simons
@ 2004-11-22 19:55 ` Kay Sievers
2004-11-23 7:50 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Kay Sievers @ 2004-11-22 19:55 UTC (permalink / raw)
To: linux-hotplug
On Mon, 2004-11-22 at 20:38 +0100, Sjoerd Simons wrote:
> Hi,
>
> I just noticed that the DEVNAME enviroment variable isn't being set anymore
Yeah, that wasn't on purpose. It just happened by moving some code where
it belongs, sorry.
> in udev 0.046 on device removal, while it was being set in 0.042. We're using
> the property tto do umount -l <devices> when a block device is removed. Afaik
> there is no other way to associate a device with it's DEVNAME on removal ?
No that's right. That information is gone that time.
> Also are there cases where doing umount -l on the removed devices is wrong?
> I guess the device is gone, so there is no sense in keeping it mounted (it's
> not like the filesystem is gonna come back in a sane state again)..
>
> Attached (trivial) patch brings back the DEVNAME variable on device removal.
I will put that in.
Thanks,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [udev] DEVNAME on device removal
2004-11-22 19:38 [udev] DEVNAME on device removal Sjoerd Simons
2004-11-22 19:55 ` Kay Sievers
@ 2004-11-23 7:50 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2004-11-23 7:50 UTC (permalink / raw)
To: linux-hotplug
On Mon, Nov 22, 2004 at 08:38:36PM +0100, Sjoerd Simons wrote:
> Hi,
>
> I just noticed that the DEVNAME enviroment variable isn't being set anymore
> in udev 0.046 on device removal, while it was being set in 0.042. We're using
> the property tto do umount -l <devices> when a block device is removed. Afaik
> there is no other way to associate a device with it's DEVNAME on removal ?
>
> Also are there cases where doing umount -l on the removed devices is wrong?
> I guess the device is gone, so there is no sense in keeping it mounted (it's
> not like the filesystem is gonna come back in a sane state again)..
>
> Attached (trivial) patch brings back the DEVNAME variable on device removal.
Applied this to the udev tree, thanks a lot for the patch.
greg k-h
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-23 7:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22 19:38 [udev] DEVNAME on device removal Sjoerd Simons
2004-11-22 19:55 ` Kay Sievers
2004-11-23 7:50 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).