diff options
author | Siim Meerits <sh0@yutani.ee> | 2020-07-27 17:37:00 +0300 |
---|---|---|
committer | Siim Meerits <sh0@yutani.ee> | 2020-07-27 17:37:00 +0300 |
commit | 456a1d598bccc260b233d2e91c469be452e0fbef (patch) | |
tree | c1288655494c94292f6e2eb26d722958899c7107 /camlibs/sierra/sierra-usbwrap.c | |
parent | af2c0e0558e78cae06371abef36f43ca74a9c5c0 (diff) | |
download | libgphoto2-456a1d598bccc260b233d2e91c469be452e0fbef.tar.gz |
Remove trailing whitespace from all *.h and *.c files.
Diffstat (limited to 'camlibs/sierra/sierra-usbwrap.c')
-rw-r--r-- | camlibs/sierra/sierra-usbwrap.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/camlibs/sierra/sierra-usbwrap.c b/camlibs/sierra/sierra-usbwrap.c index 8ca4b6bbb..449300fb6 100644 --- a/camlibs/sierra/sierra-usbwrap.c +++ b/camlibs/sierra/sierra-usbwrap.c @@ -8,22 +8,22 @@ * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA - * + * * * Olympus C-3040Z (and possibly also the C-2040Z and others) have * a USB PC Control mode in which "Sierra" protocol packets are tunneled * inside another protocol. This file implements the wrapper protocol. * The (ab)use of USB clear halt is not needed for this protocol. - * + * * The other protocol is "SCSI via USB Mass Storage", so we can also use * the Linux SCSI APIs. Interesting is also that the header looks a bit * like a PTP header. @@ -138,7 +138,7 @@ typedef struct unsigned char flags; /* in / out flag mostly */ unsigned char lun; /* 0 here */ unsigned char length; /* of the CDB... but 0x0c is used here in the traces */ - unsigned char cdb[16]; + unsigned char cdb[16]; } uw_header_t; /* @@ -373,7 +373,7 @@ usb_wrap_CMND(gp_port* dev, unsigned int type, char* sierra_msg, int sierra_len) int ret, msg_len = sizeof(*msg) + sierra_len; char sense_buffer[32]; uw_scsicmd_t cmd; - + GP_DEBUG( "usb_wrap_CMND" ); memset(&cmd, 0, sizeof(cmd)); @@ -387,7 +387,7 @@ usb_wrap_CMND(gp_port* dev, unsigned int type, char* sierra_msg, int sierra_len) memcpy((char*)msg + sizeof(*msg), sierra_msg, sierra_len); GP_DEBUG( "usb_wrap_CMND writing %i", msg_len); - + ret = gp_port_send_scsi_cmd (dev, 1, (char*)&cmd, sizeof(cmd), sense_buffer, sizeof(sense_buffer), (char*)msg, msg_len); free(msg); @@ -408,7 +408,7 @@ usb_wrap_SIZE(gp_port* dev, unsigned int type, uw32_t* size) int ret; char sense_buffer[32]; uw_scsicmd_t cmd; - + GP_DEBUG( "usb_wrap_SIZE" ); memset(&cmd, 0, sizeof(cmd)); @@ -499,7 +499,7 @@ usb_wrap_write_packet (GPPort *dev, unsigned int type, char *sierra_msg, int sie CR (usb_wrap_RDY (dev, type)); CR (usb_wrap_CMND (dev, type, sierra_msg, sierra_len)); CR (usb_wrap_STAT (dev, type)); - + return GP_OK; } @@ -514,6 +514,6 @@ usb_wrap_read_packet (GPPort *dev, unsigned int type, char *sierra_response, int CR (usb_wrap_SIZE (dev, type, &uw_size)); CR (usb_wrap_DATA (dev, type, sierra_response, &sierra_len, uw_size)); CR (usb_wrap_STAT (dev, type)); - + return sierra_len; } |