- fixed warnings, produced by Haiku version of gcc;

- space-based indentations replaced with tab-based ones;
 - a bit of cleanup;


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18785 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
imker
2006-09-08 19:45:43 +00:00
parent 65482713f4
commit 57c4d430a5
2 changed files with 407 additions and 396 deletions
@@ -1,9 +1,15 @@
/*
* Copyright (c) 2003-2005 by Siarzhuk Zharski <[email protected]>
* Distributed under the terms of the BSD License.
/**
*
* TODO: description
*
* This file is a part of USB SCSI CAM for Haiku OS.
* May be used under terms of the MIT License
*
* Author(s):
* Siarzhuk Zharski <[email protected]>
*
*
*/
/** SCSI commands transformations support */
#include "usb_scsi.h"
@@ -14,10 +20,22 @@
#include "scsi_commands.h"
//#include "proto_common.h"
#include "settings.h"
#include "strings.h"
#define UFI_COMMAND_LEN 12
#define ATAPI_COMMAND_LEN 12
static status_t
scsi_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen);
static status_t rbc_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen);
static status_t ufi_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen);
static status_t atapi_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen);
static status_t qic157_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen);
/**
\fn:transform_6_to_10
\param cmd: SCSI command buffer to be transformed
@@ -29,10 +47,8 @@
returned in rcmd parameter. In case if no transformation was performed the return
buffer is untouched.
*/
static bool transform_6_to_10(uint8 *cmd,
uint8 len,
uint8 **rcmd,
uint8 *rlen)
static bool transform_6_to_10(uint8 *cmd, uint8 len,
uint8 **rcmd, uint8 *rlen)
{
bool transformed = true;
scsi_cmd_generic_6 *from = (scsi_cmd_generic_6 *)cmd;
@@ -82,11 +98,8 @@ static bool transform_6_to_10(uint8 *cmd,
transforms a 6-byte command to 10-byte depending on information provided with
udi object.
*/
static bool transform_cmd_6_to_10(usb_device_info *udi,
uint8 *cmd,
uint8 len,
uint8 **rcmd,
uint8 *rlen)
static bool transform_cmd_6_to_10(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen)
{
bool transformed = true;
scsi_cmd_generic_6 *from = (scsi_cmd_generic_6 *)cmd;
@@ -124,10 +137,8 @@ static bool transform_cmd_6_to_10(usb_device_info *udi,
on properties provided with udi object.
*/
static bool transform_cmd_test_unit_ready(usb_device_info *udi,
uint8 *cmd,
uint8 len,
uint8 **rcmd,
uint8 *rlen)
uint8 *cmd, uint8 len,
uint8 **rcmd, uint8 *rlen)
{
bool transformed = false;
if(HAS_FIXES(udi->properties, FIX_TRANS_TEST_UNIT)){
@@ -154,11 +165,8 @@ static bool transform_cmd_test_unit_ready(usb_device_info *udi,
was performed resulting command buffer points to original one.
*/
status_t
scsi_transform(usb_device_info *udi,
uint8 *cmd,
uint8 len,
uint8 **rcmd,
uint8 *rlen)
scsi_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen)
{
status_t status = B_OK;
bool transformed = false;
@@ -196,11 +204,8 @@ scsi_transform(usb_device_info *udi,
it tries to make some workarounds for "brocken" USB devices. If no transformation
was performed resulting command buffer points to original one.
*/
status_t rbc_transform(usb_device_info *udi,
uint8 *cmd,
uint8 len,
uint8 **rcmd,
uint8 *rlen)
status_t rbc_transform(usb_device_info *udi, uint8 *cmd,
uint8 len, uint8 **rcmd, uint8 *rlen)
{
status_t status = B_OK;
bool transformed = false;
@@ -1,9 +1,15 @@
/*
* Copyright (c) 2003-2005 by Siarzhuk Zharski <[email protected]>
* Distributed under the terms of the BSD License.
/**
*
* TODO: description
*
* This file is a part of USB SCSI CAM for Haiku OS.
* May be used under terms of the MIT License
*
* Author(s):
* Siarzhuk Zharski <[email protected]>
*
*
*/
/** decalration of SCSI commands transformation procedures */
#ifndef _TRANSFORM_PROCS_H_