Examples of DescriptorFormatSenseData


Examples of org.jscsi.target.scsi.sense.DescriptorFormatSenseData

                SenseData senseData;
                final SenseKey senseKey = SenseKey.NO_SENSE;
                final AdditionalSenseCodeAndQualifier additionalSense = AdditionalSenseCodeAndQualifier.NO_ADDITIONAL_SENSE_INFORMATION;

                if (cdb.getDescriptorFormat()) {
                    senseData = new DescriptorFormatSenseData(ErrorType.CURRENT,// errorType
                    senseKey,// sense key
                    additionalSense,// additional sense code and qualifier
                    new SenseDataDescriptor[0]);// sense data descriptors
                } else {
                    senseData = new FixedFormatSenseData(false,// valid
View Full Code Here

Examples of org.jscsi.target.scsi.sense.DescriptorFormatSenseData

        SenseData senseData;

        if (cdb.getDescriptorFormat()) {
            // descriptor format sense data has been requested

            senseData = new DescriptorFormatSenseData(ErrorType.CURRENT,// errorType
            SenseKey.ILLEGAL_REQUEST,// sense key
            AdditionalSenseCodeAndQualifier.INVALID_FIELD_IN_CDB,// additional
                                                                 // sense
                                                                 // code
                                                                 // and
View Full Code Here

Examples of org.jscsi.target.scsi.sense.DescriptorFormatSenseData

            SenseData senseData;

            if (cdb.getDescriptorFormat()) {
                // descriptor format sense data has been requested

                senseData = new DescriptorFormatSenseData(ErrorType.CURRENT,// errorType
                SenseKey.ILLEGAL_REQUEST,// sense key
                AdditionalSenseCodeAndQualifier.INVALID_FIELD_IN_CDB,// additional
                                                                     // sense
                                                                     // code
                                                                     // and
                                                                     // qualifier
                new SenseDataDescriptor[0]);// sense data descriptors

            } else {
                // fixed format sense data has been requested

                senseData = new FixedFormatSenseData(false,// valid
                ErrorType.CURRENT,// error type
                false,// file mark
                false,// end of medium
                false,// incorrect length indicator
                SenseKey.ILLEGAL_REQUEST,// sense key
                new FourByteInformation(),// information
                new FourByteInformation(),// command specific
                                          // information
                AdditionalSenseCodeAndQualifier.INVALID_FIELD_IN_CDB,// additional
                                                                     // sense
                                                                     // code
                                                                     // and
                                                                     // qualifier
                (byte) 0,// field replaceable unit code
                illegalFieldPointers[0],// sense key specific data, only
                                        // report first problem
                new AdditionalSenseBytes());// additional sense bytes
            }

            responsePDU = TargetPduFactory.createSCSIResponsePdu(false,// bidirectionalReadResidualOverflow
                    false,// bidirectionalReadResidualUnderflow
                    false,// residualOverflow
                    false,// residualUnderflow,
                    SCSIResponseParser.ServiceResponse.TARGET_FAILURE,// response,
                    SCSIStatus.CHECK_CONDITION,// status,
                    bhs.getInitiatorTaskTag(),// initiatorTaskTag,
                    0,// snackTag
                    0,// expectedDataSequenceNumber
                    0,// bidirectionalReadResidualCount
                    0,// residualCount
                    new ScsiResponseDataSegment(senseData, parser.getExpectedDataTransferLength()));// data
                                                                                                    // segment

        } else {
            /*
             * PDU is okay carry out command Sense data shall be available and cleared under the conditions defined in
             * SAM-3. If the device server has no other sense data available to return, it shall return the sense key
             * set to NO SENSE and the additional sense code set to NO ADDITIONAL SENSE INFORMATION. This will always be
             * the case with the jSCSI Target.
             */

            SenseData senseData;

            final SenseKey senseKey = SenseKey.NO_SENSE;
            final AdditionalSenseCodeAndQualifier additionalSense = AdditionalSenseCodeAndQualifier.NO_ADDITIONAL_SENSE_INFORMATION;

            if (cdb.getDescriptorFormat()) {
                // descriptor format sense data has been requested

                senseData = new DescriptorFormatSenseData(ErrorType.CURRENT,// errorType
                senseKey,// sense key
                additionalSense,// additional sense code and qualifier
                new SenseDataDescriptor[0]);// sense data descriptors

            } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.