Lines Matching refs:raw_cmd
606 static __inline__ void print_message(RawRequest_t *raw_cmd,const char *message)
613 for (i=0; i< raw_cmd->cmd_count; i++)
615 (int)raw_cmd->cmd[i] );
617 for (i=0; i< raw_cmd->reply_count; i++)
619 (int)raw_cmd->reply[i] );
621 code = (raw_cmd->reply[0] <<16) +
622 (raw_cmd->reply[1] << 8) +
623 raw_cmd->reply[2];
638 int send_one_cmd(int fd, RawRequest_t *raw_cmd, const char *message)
640 if (ioctl( fd, FDRAWCMD, raw_cmd) >= 0) {
641 if (raw_cmd->reply_count < 7) {
674 int analyze_one_reply(RawRequest_t *raw_cmd, int *bytes, int do_print)
677 if(raw_cmd->reply_count == 7) {
680 if (raw_cmd->reply[3] != raw_cmd->cmd[2]) {
682 end = raw_cmd->cmd[6] + 1;
684 end = raw_cmd->reply[5];
687 *bytes = end - raw_cmd->cmd[4];
689 *bytes = *bytes << (7 + raw_cmd->cmd[5]);
693 switch(raw_cmd->reply[0] & 0xc0){
695 if ((raw_cmd->reply[0] & 0x38) == 0 &&
696 (raw_cmd->reply[1]) == 0x80 &&
697 (raw_cmd->reply[2]) == 0) {
698 *bytes += 1 << (7 + raw_cmd->cmd[5]);
702 if ( raw_cmd->reply[1] & ST1_WP ){
709 print_message(raw_cmd, "");
725 if(raw_cmd->flags & FD_RAW_MORE)