2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
47 else if (wwn.startsWith(
"50060e8010"))
49 else if (wwn.startsWith(
"50060e8"))
64 String res = super.toString();
65 if (null == res) res =
"";
66 if (!
brief) res +=
"HDS-";
79 BigInteger serDirPort =
wwn.remainder(
new BigInteger(
"1000000000",16));
82 BigInteger modelDirPort[];
83 modelDirPort = serDirPort.divideAndRemainder(
new BigInteger(
"1000000",16));
85 switch (modelDirPort[0].intValue())
117 res += String.format(
"HDSUnkn%03x-",modelDirPort[0].intValue());
121 BigInteger serialPort[] = modelDirPort[1].divideAndRemainder(
new BigInteger(
"100",16));
122 serialPort[0] = serialPort[0].add(modelDirPort[0].divide(
new BigInteger(
"10",16)).multiply(
new BigInteger(
"10000",16)));
123 BigInteger clusterPort[] = serialPort[1].divideAndRemainder(
new BigInteger(
"10",16));
125 port += clusterPort[1].intValue();
126 if (port >
'H') port ++;
127 return res + String.format(
"%05d-CL%x%c",serialPort[0].intValue(),clusterPort[0].intValue()+1, port);