From 4d6896745e988550ca6401be14bf23b75f6a0a3c Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 26 Dec 2008 17:49:27 +0000 Subject: [PATCH] READ POSITION command's constants cleanup, since LONG_BIT conflicts with constant defined in /usr/include/bits/xopen_lim.h git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@626 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst_const.h | 7 ------- scst/src/scst_lib.c | 6 +++--- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/scst/include/scst_const.h b/scst/include/scst_const.h index 2c8447997..3f7fea259 100644 --- a/scst/include/scst_const.h +++ b/scst/include/scst_const.h @@ -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 *************************************************************/ diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index b98bfa011..168fad73e 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -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 =