On Sun, Oct 10, 2010 at 2:13 PM, Adrian Chadd <adr...@creative.net.au> wrote: > The horrible, O(n) way is to just to loop over 0 .. n, see if it doesn't > exist, if it doesn't then create and use it. > > It's slow, it's racy (ie, don't run the script without locking :-) but > it's a traditional UNIX way of doing things.
Think I'll avoid that on principle. Providing a minor # at all seems strange to me. Like Linux should do it. Why do I want or need to know about these MINOR #s anyway?! All I want is an lo dev; far away from this cold nightmare (with apologies to Frederick Loewe). At least losetup is an ELF exe, so if it does the anything similar it should be a little quicker, non-racy, and debugged than my own shell script, notwithstanding statically pre-allocated dev nodes. One can hope :) ta zen -- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html