Hello community, here is the log from the commit of package mtx for openSUSE:Factory checked in at 2014-04-11 13:40:11 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/mtx (Old) and /work/SRC/openSUSE:Factory/.mtx.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "mtx" Changes: -------- --- /work/SRC/openSUSE:Factory/mtx/mtx.changes 2011-12-08 11:53:48.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.mtx.new/mtx.changes 2014-04-11 13:40:12.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Apr 9 17:09:23 UTC 2014 - [email protected] + +- mtx-1.3.11-large-slots.patch: fix problem with large number of + slots in a virtual tape library (bnc#857901, forward from SLE11) + +------------------------------------------------------------------- New: ---- mtx-1.3.11-large-slots.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ mtx.spec ++++++ --- /var/tmp/diff_new_pack.qmb4Bz/_old 2014-04-11 13:40:13.000000000 +0200 +++ /var/tmp/diff_new_pack.qmb4Bz/_new 2014-04-11 13:40:13.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package mtx # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,16 +15,18 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: mtx -License: GPL-2.0+ -Group: Hardware/Other BuildRequires: automake Summary: A Program for Controlling the Robotic Mechanism in DDS Auto Loaders +License: GPL-2.0+ +Group: Hardware/Other Version: 1.3.12 Release: 0 Source: %{name}-%{version}.tar.bz2 -Patch: %{name}-%{version}-param_h.patch -Patch2: %{name}-%{version}-autoconf.patch +Patch: %{name}-1.3.12-param_h.patch +Patch2: %{name}-1.3.12-autoconf.patch +Patch3: mtx-1.3.11-large-slots.patch Url: http://mtx.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -41,6 +43,7 @@ %setup %patch %patch2 +%patch3 %build %{?suse_update_config:%{suse_update_config -f}} ++++++ mtx-1.3.11-large-slots.patch ++++++ --- mtxl.c.orig 2014-03-03 06:50:09.000000000 +0100 +++ mtxl.c 2014-03-03 06:52:54.000000000 +0100 @@ -39,6 +39,8 @@ /* zap the following define when we finally add real import/export support */ #define IMPORT_EXPORT_HACK 1 /* for the moment, import/export == storage */ +#define ElemsPerRES 5000 /* WEK only so many element per SCSI Read Element Status */ + /* First, do some SCSI routines: */ /* the camlib is used on FreeBSD. */ @@ -1131,6 +1143,7 @@ int empty_idx = 0; boolean is_attached = false; int i,j; + int FirstElem, NumElem, NumThisRES; /* WEK */ ElementModeSense_T *mode_sense = NULL; @@ -1195,14 +1208,31 @@ { #ifdef DEBUG fprintf(stderr,"Using original element status polling method (storage, import/export, drivers etc independantly)\n"); + fprintf(stderr,"Storage start %d, Num %d, max %d\n", mode_sense->StorageStart, mode_sense->NumStorage - mode_sense->NumImportExport, mode_sense->MaxReadElementStatusData); /* WEK */ #endif flags->elementtype = StorageElement; /* sigh! */ + + NumElem = mode_sense->NumStorage - mode_sense->NumImportExport; + FirstElem = mode_sense->StorageStart; + + do + { + if (NumElem > ElemsPerRES) + { + NumThisRES = ElemsPerRES; + } + else + { + NumThisRES = NumElem; + } + DataBuffer = SendElementStatusRequest( MediumChangerFD, RequestSense, inquiry_info, flags, - mode_sense->StorageStart, + FirstElem, /* WEK */ /* adjust for import/export. */ - mode_sense->NumStorage - mode_sense->NumImportExport, - mode_sense->MaxReadElementStatusData); + NumThisRES, /* WEK */ + ElemsPerRES * 52 +120); + /* mode_sense->MaxReadElementStatusData); WEK */ if (!DataBuffer) { @@ -1224,6 +1254,10 @@ DataBuffer,ElementStatus,mode_sense,NULL); free(DataBuffer); /* sigh! */ + FirstElem += ElemsPerRES; + NumElem -= ElemsPerRES; + + } while ( NumElem > 0 ); /* WEK */ /* --------------IMPORT/EXPORT--------------- */ /* Next let's see if we need to do Import/Export: */ @@ -1237,7 +1271,8 @@ inquiry_info, flags, mode_sense->ImportExportStart, mode_sense->NumImportExport, - mode_sense->MaxReadElementStatusData); + ElemsPerRES * 52 +120); + /* mode_sense->MaxReadElementStatusData); WEK */ if (!DataBuffer) { @@ -1273,7 +1308,8 @@ inquiry_info, flags, mode_sense->DataTransferStart, mode_sense->NumDataTransfer, - mode_sense->MaxReadElementStatusData); + ElemsPerRES * 52 +120); + /* mode_sense->MaxReadElementStatusData); WEK */ if (!DataBuffer) { #ifdef DEBUG @@ -1312,7 +1348,8 @@ inquiry_info, flags, mode_sense->MediumTransportStart, 1, /* only get 1, sigh. */ - mode_sense->MaxReadElementStatusData); + ElemsPerRES * 52 +120); + /* mode_sense->MaxReadElementStatusData); WEK */ if (!DataBuffer) { #ifdef DEBUG -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
