[PATCH] libgphoto2 - canon, pliki >10MB
Michal Kochanowicz
michal w michal.waw.pl
Sob, 28 Sie 2004, 11:39:39 CEST
Hej,
W wersji 2.1.4 w sterowniku Canona jest błąd uniemożliwiający
ściągnięcie z aparatu plików większych niż 10MB.
Załączony patch pochodzi z CVS projektu.
--
--= Michal Kochanowicz =--==--==BOFH==--==--= michal w michal.waw.pl =--
--= finger me for PGP public key or visit http://michal.waw.pl/PGP =--
--==--==--==--==--==-- Vodka. Connecting people.--==--==--==--==--==--
A chodzenie po górach SSIE!!!
-------------- następna część ---------
===================================================================
RCS file: /cvsroot/gphoto/libgphoto2/camlibs/canon/canon.c,v
retrieving revision 1.240
retrieving revision 1.241
diff -u -r1.240 -r1.241
--- gphoto/libgphoto2/camlibs/canon/canon.c 2004/03/07 20:41:58 1.240
+++ gphoto/libgphoto2/camlibs/canon/canon.c 2004/04/04 10:21:51 1.241
@@ -88,12 +88,12 @@
**/
/* SL_* - size limit constants */
-#define KILOBYTE (1024)
-#define MEGABYTE (1024 * KILOBYTE)
-#define SL_THUMB ( 100 * KILOBYTE)
-#define SL_PICTURE ( 10 * MEGABYTE)
-#define SL_MOVIE_SMALL ( 100 * MEGABYTE)
-#define SL_MOVIE_LARGE (2048 * MEGABYTE)
+#define KILOBYTE (1024U)
+#define MEGABYTE (1024U * KILOBYTE)
+#define SL_THUMB ( 100U * KILOBYTE)
+#define SL_PICTURE ( 10U * MEGABYTE)
+#define SL_MOVIE_SMALL ( 100U * MEGABYTE)
+#define SL_MOVIE_LARGE (2048U * MEGABYTE)
#define NO_USB 0
const struct canonCamModelData models[] = {
===================================================================
RCS file: /cvsroot/gphoto/libgphoto2/camlibs/canon/usb.c,v
retrieving revision 1.83
retrieving revision 1.85
diff -u -r1.83 -r1.85
--- gphoto/libgphoto2/camlibs/canon/usb.c 2004/01/02 15:42:33 1.83
+++ gphoto/libgphoto2/camlibs/canon/usb.c 2004/02/03 18:24:39 1.85
@@ -1178,7 +1178,7 @@
/* the 1 is to show status */
res = canon_usb_long_dialogue (camera, CANON_USB_FUNCTION_GET_FILE, data, length,
- camera->pl->md->max_picture_size, payload,
+ camera->pl->md->max_movie_size, payload,
payload_length, 1, context);
if (res != GP_OK) {
GP_DEBUG ("canon_usb_get_file: canon_usb_long_dialogue() "
-------------- następna część ---------
Index: libgphoto2.spec
===================================================================
RCS file: /cvsroot/SPECS/libgphoto2.spec,v
retrieving revision 1.18
diff -u -r1.18 libgphoto2.spec
--- libgphoto2.spec 6 Aug 2004 19:24:30 -0000 1.18
+++ libgphoto2.spec 28 Aug 2004 09:27:23 -0000
@@ -5,13 +5,14 @@
Summary(pt_BR): GNU Photo - programa GNU para câmeras digitais
Name: libgphoto2
Version: 2.1.4
-Release: 3
+Release: 4
License: LGPL
Group: Applications
Source0: http://dl.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
# Source0-md5: a201650482bbc2edbd948449cf4d3f5a
Patch0: %{name}-pmake.patch
Patch1: %{name}-locale-names.patch
+Patch2: %{name}-canon-filesizelimit.patch
URL: http://www.gphoto.org/
BuildRequires: autoconf
BuildRequires: automake
@@ -92,6 +93,7 @@
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p2
mv -f po/{no,nb}.po
mv -f libgphoto2_port/po/{no,nb}.po
Więcej informacji o liście dyskusyjnej pld-devel-pl