/** * Returns <code>true</code> for those and only for those VPD Page Codes which are supported by the jSCSI Target. * * @param vitalProductDataPageName VPD Page Name whose support is inquired * @return <code>true</code> for those and only for those VPD Page Codes which are supported by the jSCSI Target */ public static boolean vpdPageCodeSupported (final VitalProductDataPageName vitalProductDataPageName) { for (int i = 0; i < SUPPORTED_VPD_PAGES.length; ++i) { PageCode pageCode = new PageCode(SUPPORTED_VPD_PAGES[i]); if (pageCode.getVitalProductDataPageName() == vitalProductDataPageName) return true; } return false; } }
LOGGER.debug("cdb.isNormalACA() = " + cdb.isNormalACA()); LOGGER.debug("cdb.getPageCode() = " + cdb.getPageCode()); LOGGER.debug("cdb.getPageCode().getVitalProductDataPageName() = " + cdb.getPageCode().getVitalProductDataPageName()); final VitalProductDataPageName pageName = cdb.getPageCode().getVitalProductDataPageName();
responseData = StandardInquiryData.getInstance(); } else { final VitalProductDataPageName pageName = cdb.getPageCode().getVitalProductDataPageName();
public InquiryCDB (ByteBuffer buffer) { super(buffer); // EVPD enableVitalProductData = BitManip.getBit(buffer.get(1),// byte 0);// bit number // page code pageCode = new PageCode(buffer.get(2)); // allocation length allocationLength = ReadWrite.readTwoByteInt(buffer, 3); final VitalProductDataPageName vpdpn = pageCode.getVitalProductDataPageName(); if (enableVitalProductData) { if (!SupportedVpdPages.vpdPageCodeSupported(vpdpn)) addIllegalFieldPointer(2);// page code not supported } else { /* * If the PAGE CODE field is not set to zero when the EVPD bit is set to zero, the command shall be * terminated with CHECK CONDITION status, with the sense key set to ILLEGAL REQUEST, and the additional * sense code set to INVALID FIELD IN CDB. */ if (vpdpn != VitalProductDataPageName.SUPPORTED_VPD_PAGES) addIllegalFieldPointer(2);// value should be 0x00 } }