On Wednesday 07 June 2006 00:29, David Härdeman wrote: > I'd love to hear some comments on this approach. One problem I see at first glance is one of translation: you cannot hardcode a string like "In use by LVM VG $vg" for $MESSAGE, unless you really want all translators (led by Christian) coming after you with a heavy cluebat... Are there cases where there could be multiple locks on the same device/partition? The current code does not seem to support this. The function names look potentially confusing too as (un)lock_device can be used for both devices and partitions. Would it not be cleaner to also pass the partition as a parameter instead of using $id? Are you sure that will always be set correctly? Is it correct that a device gets unlocked if there are partitions on it that are still locked (partitions other than the current one being unlocked)? Cheers, FJP
Attachment:
pgpWUV1Lro8xW.pgp
Description: PGP signature