[lockdev-devel] [PATCH] locking of non-devices doesn't work with SVr4 lock files
Ludwig Nussel
ludwig.nussel at suse.de
Mon Mar 15 09:36:18 UTC 2010
Roger Leigh wrote:
> Thanks, I've now applied (I think) all your patches to date and pushed
> them. WRT the removal of support for devices outside of /dev, this
> support is present in the minicom locking code, so maybe we should
> keep this? So long as we are using the device major and minor and not
> the name for locking, this should work just fine.
minicom just calls basename() on the device name AFAICS. That method
does't work for subdirectories of /dev though. What would be your
suggestion on how to name lock files outside of /dev?
> I'm also not sure about some of the special-casing in
> _dl_check_devname, for example "/dev/tty"/"tty". While locking
> /dev/tty makes little sense, assuming that this is ttyname(0)
> is not always going to be a valid assumption (it could be closed).
> I'm not sure exactly why a simple stat(2) of the device not is not
> entirely sufficient here (which we already do). What special cases
> does this function cover?
No idea. The ttyname thing looks unnecessary indeed. Checking
whether the device name is ok could be done in _dl_filename_2
instead. _dl_filename_1 doesn't need the name checks.
cu
Ludwig
--
(o_ Ludwig Nussel
//\
V_/_ http://www.suse.de/
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
More information about the lockdev-devel
mailing list