Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Aug 2003 14:17:31 +0900
From:      kaz@kobe1995.net (NAKAMURA Kazushi)
To:        sane-devel@mostang.com, ports@FreeBSD.ORG
Cc:        kaz@kobe1995.net
Subject:   Please merge this for EPSON GT-9700F
Message-ID:  <030813141731.M0127146@ns.kobe1995.net>

next in thread | raw e-mail | index | archive | help
Hi, the sane-backend works fine on my EPSON GT-9700F (USB & IEEE1394).
But it needs simokawa-san's patch for sane-1.0.11. Please merge it.
Thank you!

==> patch-epson.c <==
--- backend/epson_scsi.c.orig	Sun Apr 27 21:57:39 2003
+++ backend/epson_scsi.c	Tue Aug 12 14:26:20 2003
@@ -93,15 +93,16 @@
 {
 	u_char * cmd;
 
-	cmd = alloca( 6 + buf_size);
-	memset( cmd, 0, 6);
+#define	ALIGN	8
+	cmd = alloca( ALIGN + buf_size);
+	memset( cmd, 0, ALIGN);
 	cmd[ 0] = WRITE_6_COMMAND;
 	cmd[ 2] = buf_size >> 16;
 	cmd[ 3] = buf_size >> 8;
 	cmd[ 4] = buf_size;
-	memcpy( cmd + 6, buf, buf_size);
+	memcpy( cmd + ALIGN, buf, buf_size);
 
-	if( SANE_STATUS_GOOD == ( *status = sanei_scsi_cmd( fd, cmd, 6 + buf_size, NULL, NULL)))
+	if( SANE_STATUS_GOOD == ( *status = sanei_scsi_cmd2( fd, cmd, 6, cmd + ALIGN, buf_size, NULL, NULL)))
 		return buf_size;
 
 	return 0;
-- 
$BCfB<OB;V!w?@8M(B		<mailto:kaz@kobe1995.net>
NAKAMURA Kazushi@KOBE	<http://kobe1995.jp/>;
- Be Free(BSD), or Die...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?030813141731.M0127146>