2 package org.smallfoot.wwn;
4 import java.math.BigInteger;
50 else if (wwn.startsWith(
"50060e8010"))
52 else if (wwn.startsWith(
"50060e8"))
67 String res = super.toString();
68 if (null == res) res =
"";
69 if (!
brief) res +=
"HDS-";
78 BigInteger serDirPort =
wwn.remainder(
new BigInteger(
"1000000",16));
81 BigInteger modelDirPort[];
82 modelDirPort = serDirPort.divideAndRemainder(
new BigInteger(
"100000",16));
84 int model = modelDirPort[0].intValue();
86 BigInteger serialPort[] = modelDirPort[1].divideAndRemainder(
new BigInteger(
"10",16));
87 int serial = serialPort[0].intValue();
88 int iPort = serialPort[1].intValue();
118 serialPort[0] = serialPort[0].add(
new BigInteger(
"100000", 16));
124 serialPort[0] = serialPort[0].add(
new BigInteger(
"100000", 16));
130 res += String.format(
"HDSUnkn%03x-",model);
133 if (serial < 0) serial += 0x10000;
144 return res + String.format(
"%05d-%d%c",serial, ctl, port);
146 return res + String.format(
"%05d-CTL%d-Port%c",serial, ctl, port);