On 19 May 2016 at 21:51, Mark Post <[email protected]> wrote: >>>> On 5/19/2016 at 04:41 PM, Alan Altmark <[email protected]> wrote: > >> I did. Unfortunately, being ignorant of script writing on Linux, I don't >> know any more than I did before I read it. :-) > > Ah, well... In that case, I check to see if there's 1 or 3 numbers separated > by periods specified for the device. So, 0123 versus 0.0.0123. If one > number, then I pre-pend 0.0. to it, otherwise I leave it alone, other than to > make sure the first two "levels" are a single digit each. Then I look in > /sys/bus/ccw/devices/ to see if that busid exists. If not, bail out. > > There are other sanity checks, but in essence, I already did what you > suggested when I first wrote the script. I just didn't allow 0.0123 as a > valid input. >
leading zeros can be ignored. E.g. with chzdev - 200, 0200, 0.0.0200 are all valid... Funnily enough "0.0200" is not valid, although it is stable id too. -- Regards, Dimitri. ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390 ---------------------------------------------------------------------- For more information on Linux on System z, visit http://wiki.linuxvm.org/
