READ POSITION command's constants cleanup, since LONG_BIT conflicts with constant...
authorvlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 26 Dec 2008 17:49:27 +0000 (17:49 +0000)
committervlnb <vlnb@d57e44dd-8a1f-0410-8b47-8ef2f437770f>
Fri, 26 Dec 2008 17:49:27 +0000 (17:49 +0000)
git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@626 d57e44dd-8a1f-0410-8b47-8ef2f437770f

scst/include/scst_const.h
scst/src/scst_lib.c

index 2c84479..3f7fea2 100644 (file)
@@ -252,13 +252,6 @@ static inline int scst_is_ua_sense(const uint8_t *sense)
 #define SCST_RES_3RDPTY              0x10
 #define SCST_RES_LONGID              0x02
 
-/*************************************************************
- ** Bits in the READ POSITION command
- *************************************************************/
-#define TCLP_BIT                     4
-#define LONG_BIT                     2
-#define BT_BIT                       1
-
 /*************************************************************
  ** Values for the control mode page TST field
  *************************************************************/
index b98bfa0..168fad7 100644 (file)
@@ -2339,9 +2339,9 @@ int scst_tape_generic_parse(struct scst_cmd *cmd,
              cmd->op_name, cmd->data_direction, cmd->op_flags, cmd->bufflen);
 
        if (cmd->cdb[0] == READ_POSITION) {
-               int tclp = cmd->cdb[1] & TCLP_BIT;
-               int long_bit = cmd->cdb[1] & LONG_BIT;
-               int bt = cmd->cdb[1] & BT_BIT;
+               int tclp = cmd->cdb[1] & 4;
+               int long_bit = cmd->cdb[1] & 2;
+               int bt = cmd->cdb[1] & 1;
 
                if ((tclp == long_bit) && (!bt || !long_bit)) {
                        cmd->bufflen =