Handle rootfs is_mounted properly

Tom Parker palfrey at tevp.net
Thu Apr 7 10:00:58 PDT 2005


David Zeuthen wrote:
> On Wed, 2005-04-06 at 14:58 +0200, Tom Parker wrote:
>>I've written a patch to do proper handling of the is_mounted setup in 

Have now fixed at least most of the problems (new version attached).

>  4. Suggest to just use stat(2) on /dev/root (it should follow
>     symlinks, otherwise use realpath to get to the real /dev
>     file) and compare the st_dev result with block.major,
>     block.minor on the HalDevice object. Also, use 

I don't have a /dev/root myself for some reason (udev 0.56 and the 2.6.10 kernel 
on a mostly-unstable Debian), so that's more a matter of existing code from the 
earlier patch as a backup case. Anyone else got a symlinked /dev/root that 
they'd like to test with this? I've removed realpath completely, and just using 
stat now. Also now using block.{major,minor} from the device rather than strcmp 
comparisms.

Tom
-- 
palfrey at tevp.net - http://tevp.net
Illegitimus non carborundum
_______________________________________________
hal mailing list
hal at lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/hal



More information about the Hal mailing list