rpms/qpxtool/F-8 qpxtool-0.6.1-fix-scsi-cmd.patch, 1.1, 1.2 qpxtool.spec, 1.3, 1.4
Adel Gadllah (drago01)
fedora-extras-commits at redhat.com
Sun Apr 6 08:11:59 UTC 2008
Author: drago01
Update of /cvs/pkgs/rpms/qpxtool/F-8
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9067
Modified Files:
qpxtool-0.6.1-fix-scsi-cmd.patch qpxtool.spec
Log Message:
Replace scsi cmd fix with upstream version
qpxtool-0.6.1-fix-scsi-cmd.patch:
Index: qpxtool-0.6.1-fix-scsi-cmd.patch
===================================================================
RCS file: /cvs/pkgs/rpms/qpxtool/F-8/qpxtool-0.6.1-fix-scsi-cmd.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- qpxtool-0.6.1-fix-scsi-cmd.patch 23 Mar 2008 11:21:32 -0000 1.1
+++ qpxtool-0.6.1-fix-scsi-cmd.patch 6 Apr 2008 08:11:53 -0000 1.2
@@ -1,31 +1,25 @@
-diff -upNr qpxtool-0.6.1.orign/lib/qpxtransport/qpx_transport.cpp qpxtool-0.6.1/lib/qpxtransport/qpx_transport.cpp
---- qpxtool-0.6.1.orign/lib/qpxtransport/qpx_transport.cpp 2007-08-19 16:04:14.000000000 +0200
-+++ qpxtool-0.6.1/lib/qpxtransport/qpx_transport.cpp 2008-03-23 12:15:03.000000000 +0100
-@@ -203,6 +203,15 @@ size_t Scsi_Command::residue() { return
- #else
- size_t Scsi_Command::residue() { return 0; }
- #endif
+--- lib/qpxtransport/qpx_transport.cpp.orig 2008-02-03 00:56:14.000000000 +0100
++++ lib/qpxtransport/qpx_transport.cpp 2008-02-03 01:14:09.000000000 +0100
+@@ -215,6 +215,21 @@
+ #define KERNEL_BROKEN 0
+ if (use_sg_io)
+ {
++ /* see linux-2.6.23/block/scsi_ioctl.c:36 */
++ static const unsigned char scsi_command_size[8] =
++ {
++ 6, 10, 10, 12,
++ 16, 12, 10, 10
++ };
++ char cmdsize, opcode;
+
-+const unsigned char scsi_command_size[8] =
-+{
-+ 6, 10, 10, 12,
-+ 16, 12, 10, 10
-+};
-+#define COMMAND_SIZE(opcode) scsi_command_size[((opcode) >> 5) & 7]
++ opcode = cgc.cmd[0];
++ /* see linux-2.6.23/include/scsi/scsi.h:25 */
++ cmdsize = scsi_command_size[((opcode) >> 5) & 7];
++ if ((sg_io.cmd_len > 0) && (sg_io.cmd_len < cmdsize)) {
++ sg_io.cmd_len = cmdsize;
++ }
+
-+
- int Scsi_Command::transport(Direction dir=NONE,void *buf=NULL,size_t sz=0)
- {
- int ret = 0;
-@@ -213,6 +222,11 @@ int Scsi_Command::transport(Direction di
sg_io.dxferp = buf;
sg_io.dxfer_len = sz;
sg_io.dxfer_direction = use_sg_io[dir];
-+ /* cmd length fix */
-+ //printf("cmd.len: %d\n",sg_io.cmd_len);
-+ sg_io.cmd_len = (sg_io.cmd_len < COMMAND_SIZE(sg_io.cmdp[0])) ? COMMAND_SIZE(sg_io.cmdp[0]):sg_io.cmd_len;
-+ //printf("new cmd.len: %d\n",sg_io.cmd_len);
-+
- if (ioctl (fd,SG_IO,&sg_io)) return -1;
- #if !KERNEL_BROKEN
- if ((sg_io.info&SG_INFO_OK_MASK) != SG_INFO_OK)
+
Index: qpxtool.spec
===================================================================
RCS file: /cvs/pkgs/rpms/qpxtool/F-8/qpxtool.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- qpxtool.spec 23 Mar 2008 11:21:32 -0000 1.3
+++ qpxtool.spec 6 Apr 2008 08:11:53 -0000 1.4
@@ -1,6 +1,6 @@
Name: qpxtool
Version: 0.6.1
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: CD/DVD Quality check tool
Group: Applications/System
@@ -41,7 +41,7 @@
%patch1 -p1 -b .consolehelper
%patch2 -p1 -b .manpagefix
%patch3 -p1 -b .buildfix
-%patch4 -p1 -b .scsicmd
+%patch4 -p0 -b .scsicmd
sed -ie 's!/usr/local!%{_prefix}!g' Makefile
sed -ie 's!\$(PREFIX)/bin!%{_sbindir}!g' Makefile
@@ -112,6 +112,9 @@
%{_libdir}/libqpxtransport.so
%changelog
+* Sun Apr 06 2008 Adel Gadllah <adel.gadllah at gmail.com> 0.6.1-8
+- Replace scsi cmd fix with upstream version
+
* Sun Mar 23 2008 Adel Gadllah <adel.gadllah at gmail.com> 0.6.1-7
- Don't use too short scsi cmd lengths (RH #428281)
More information about the fedora-extras-commits
mailing list