Hello community,
here is the log from the commit of package libmtp for openSUSE:Factory
checked in at Tue Feb 15 16:50:39 CET 2011.
--------
--- libmtp/libmtp.changes 2011-01-25 16:08:33.000000000 +0100
+++ libmtp/libmtp.changes 2011-02-15 14:28:41.000000000 +0100
@@ -1,0 +2,8 @@
+Tue Feb 15 11:02:08 CET 2011 - meissner@suse.de
+
+- updated to 1.0.6
+ * even less aggressive mtp probing (not detecting nearly all
+ devices as MTP) bnc#668986
+ * some more USB ids
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
0001-do-not-match-PTP-generic-interface.patch
libmtp-1.0.4.tar.bz2
New:
----
libmtp-1.0.6.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libmtp.spec ++++++
--- /var/tmp/diff_new_pack.u7fL2c/_old 2011-02-15 16:48:55.000000000 +0100
+++ /var/tmp/diff_new_pack.u7fL2c/_new 2011-02-15 16:48:55.000000000 +0100
@@ -26,10 +26,9 @@
Group: Productivity/Multimedia/Sound/Players
AutoReqProv: on
Summary: Commandline utilities for access to MTP Players
-Version: 1.0.4
-Release: 2
+Version: 1.0.6
+Release: 1
Source0: %name-%version.tar.bz2
-Patch0: 0001-do-not-match-PTP-generic-interface.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -121,10 +120,9 @@
%prep
%setup -q
-%patch0 -p1
%build
-%configure --disable-static
+%configure --disable-static --enable-doxygen
make
%install
@@ -134,6 +132,8 @@
rm -rf $RPM_BUILD_ROOT/usr/share/doc/libmtp*
rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la
+mv $RPM_BUILD_ROOT/lib/udev/rules.d/libmtp.rules $RPM_BUILD_ROOT/lib/udev/rules.d/39-libmtp.rules
+
%post -n libmtp8 -p /sbin/ldconfig
%postun -n libmtp8 -p /sbin/ldconfig
@@ -154,7 +154,7 @@
%dir /lib/udev
/lib/udev/mtp-probe
%dir /lib/udev/rules.d
-%config /lib/udev/rules.d/libmtp.rules
+%config /lib/udev/rules.d/39-libmtp.rules
%files devel
%defattr(-, root, root)
++++++ libmtp-1.0.4.tar.bz2 -> libmtp-1.0.6.tar.bz2 ++++++
++++ 4384 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/ChangeLog new/libmtp-1.0.6/ChangeLog
--- old/libmtp-1.0.4/ChangeLog 2011-01-09 00:32:14.000000000 +0100
+++ new/libmtp-1.0.6/ChangeLog 2011-01-26 06:22:41.000000000 +0100
@@ -1,3 +1,9 @@
+2011-01-19 Linus Walleij
+
+ RETIRING THIS FILE! WE HAVE MIGRATED TO GIT WHICH
+ PROVIDES EASY ACCESS TO THE CHANGELOG, LETS GET RID
+ OF THIS ANCIENT CRUFT
+
2011-01-09 Linus Walleij
* configure.ac: bump to 1.0.4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/INSTALL new/libmtp-1.0.6/INSTALL
--- old/libmtp-1.0.4/INSTALL 2011-01-09 00:32:14.000000000 +0100
+++ new/libmtp-1.0.6/INSTALL 2011-02-15 10:17:16.000000000 +0100
@@ -213,4 +213,44 @@
function in your program, see the Autoconf texinfo documentation.
See further:
-http://wiki.buici.com/wiki/Autoconf_and_RPL_MALLOC
\ No newline at end of file
+http://wiki.buici.com/wiki/Autoconf_and_RPL_MALLOC
+
+Compilation for Solaris/SunOS
+-----------------------------
+
+libmtp builds on Solaris/SunOS with either gcc or SunStudio 12. It does
+require GNU Make (aka gmake) to be installed.
+
+To build using GCC:
+ % CFLAGS="I/usr/sfw/lib -L/usr/sfw/lib -R/usr/sfw/lib" MAKE=gmake \
+ INSTALL=/usr/ucb/install ./configure
+ % gmake
+ % gmake install
+
+Custom CLFAGS are required for libusb.so as it lives in /usr/sfw/lib,
+and this path is not in the default search path for ld. If these
+CFLAGS are not set, several components of ./configure will fail leading
+to a failed build.
+
+To build using SunStudio 12:
+
+Comment out CFLAGS="$CFLAGS -Wall -Wmissing-prototypes" in configure.ac
+and rebuild ./configure using autoconf. Alternatively comment out line
+ CFLAGS="$CFLAGS -Wall -Wmissing-prototypes"
+in ./configure if you want to save rebuilding ./configure. The -W
+options are not valid for SunStudio and will cause some tests in ./configure
+to fail and also create non-valid Makefiles which will cause building libmtp
+to fail as well. Then:
+
+ % CFLAGS="I/usr/sfw/lib -L/usr/sfw/lib -R/usr/sfw/lib" MAKE=gmake \
+ INSTALL=/usr/ucb/install CC=cc ./configure
+ % gmake
+ % gmake install
+
+
+General Notes:
+All MTP devices on Solaris 10u2+ are driven by the usb_mid driver, which
+will automatically export ugen device interfaces with the correct device
+permissions. No special configuration is required. See the usb_mid(7D)
+and ugen(7D) manpages and /usr/sfw/share/doc/libusb/libusb.txt for
+more information.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/Makefile.am new/libmtp-1.0.6/Makefile.am
--- old/libmtp-1.0.4/Makefile.am 2010-12-19 12:07:34.000000000 +0100
+++ new/libmtp-1.0.6/Makefile.am 2011-02-12 13:16:47.000000000 +0100
@@ -9,16 +9,16 @@
# This stuff only makes sense on Linux so only
# build and ship it on Linux.
if USE_LINUX
-udevrulesdir=$(libexecdir)/rules.d
-udevrules_DATA=libmtp.rules
+udevrulesdir=@UDEV@/rules.d
+udevrules_DATA=@UDEV_RULES@
noinst_DATA=libmtp.usermap libmtp.fdi
libmtp.usermap: util/mtp-hotplug
util/mtp-hotplug > libmtp.usermap
-libmtp.rules: util/mtp-hotplug
- util/mtp-hotplug -u > libmtp.rules
+@UDEV_RULES@: util/mtp-hotplug
+ util/mtp-hotplug -u -p"@UDEV@" @UDEV_GROUP@ @UDEV_MODE@ > @UDEV_RULES@
libmtp.fdi: util/mtp-hotplug
util/mtp-hotplug -H > libmtp.fdi
-CLEANFILES = libmtp.usermap libmtp.rules libmtp.fdi
+CLEANFILES = libmtp.usermap @UDEV_RULES@ libmtp.fdi
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/config.h.in new/libmtp-1.0.6/config.h.in
--- old/libmtp-1.0.4/config.h.in 2011-01-09 00:33:21.000000000 +0100
+++ new/libmtp-1.0.6/config.h.in 2011-02-12 13:18:41.000000000 +0100
@@ -30,9 +30,6 @@
/* Define if you have the iconv() function and it works. */
#undef HAVE_ICONV
-/* Define to 1 if you have the header file. */
-#undef HAVE_ICONV_H
-
/* Define to 1 if you have the header file. */
#undef HAVE_INTTYPES_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/configure.ac new/libmtp-1.0.6/configure.ac
--- old/libmtp-1.0.4/configure.ac 2011-01-09 00:32:14.000000000 +0100
+++ new/libmtp-1.0.6/configure.ac 2011-02-12 13:16:47.000000000 +0100
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([libmtp], [1.0.4], [libmtp-discuss@lists.sourceforge.net])
+AC_INIT([libmtp], [1.0.6], [libmtp-discuss@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/libmtp.c])
@@ -14,17 +14,53 @@
AC_PROG_LIBTOOL
AM_ICONV
-# For this library the default libexecdir is the udev
-# dir, because it's only used for the udev probe program
-# nothing else makes sense for this.
-libexecdir=/lib/udev
-
-# Check for doxygen
-AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
-AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN)
-if test $HAVE_DOXYGEN = "false"; then
- AC_MSG_WARN([*** doxygen not found, docs will not be built])
+# Optionally set install location of udev
+UDEV=/lib/udev
+AC_ARG_WITH(udev,
+ AC_HELP_STRING([--with-udev=DIR],
+ [directory where udev is installed [default=/lib/udev]]),
+ [UDEV="${withval}"], [])
+AC_SUBST(UDEV)
+
+# Optionally set name of udev rules file
+UDEV_RULES=libmtp.rules
+AC_ARG_WITH(udev-rules,
+ AC_HELP_STRING([--with-udev-rules=NAME],
+ [file name for udev rules [default=libmtp.rules]]),
+ [UDEV_RULES="${withval}"], [])
+AC_SUBST(UDEV_RULES)
+
+# Optionally set group for device nodes
+UDEV_GROUP=
+AC_ARG_WITH(udev-group,
+ AC_HELP_STRING([--with-udev-group=GROUP],
+ [file group for device nodes [default: none specified]]]),
+ [UDEV_GROUP="-g\"${withval}\""], [])
+AC_SUBST(UDEV_GROUP)
+
+# Optionally set mode for device nodes
+UDEV_MODE=
+AC_ARG_WITH(udev-mode,
+ AC_HELP_STRING([--with-udev-mode=GROUP],
+ [file mode for device nodes [default: none specified]]]),
+ [UDEV_MODE="-m\"${withval}\""], [])
+AC_SUBST(UDEV_MODE)
+
+# Optionally enable and check for doxygen
+AC_ARG_ENABLE([doxygen],
+ AS_HELP_STRING([--enable-doxygen], [Build API documentation using Doxygen [default=no]]),
+ [ac_enable_doxygen=$enableval], [ac_enable_doxygen=auto])
+if test "x$ac_enable_doxygen" == "xyes"; then
+ AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, true, false)
+ if test "x$HAVE_DOXYGEN" = "xfalse" -a "x$ac_enable_doxygen" = "xyes"; then
+ AC_MSG_ERROR([*** API documentation explicitly requested but Doxygen not found])
+ fi
+ AC_MSG_NOTICE([API documentation will be generated using Doxygen])
+else
+ HAVE_DOXYGEN=false
+ AC_MSG_NOTICE([API documentation will not be generated])
fi
+AM_CONDITIONAL(HAVE_DOXYGEN,$HAVE_DOXYGEN)
# Check for Darwin
AC_MSG_CHECKING([if the host operating system is Darwin])
@@ -81,7 +117,7 @@
# zlib.h the day we need to decompress firmware
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h getopt.h libgen.h \
limits.h stdio.h string.h sys/stat.h sys/time.h unistd.h \
- iconv.h langinfo.h locale.h arpa/inet.h byteswap.h sys/uio.h])
+ langinfo.h locale.h arpa/inet.h byteswap.h sys/uio.h])
AC_CHECK_HEADER([usb.h],,
AC_MSG_ERROR([I can't find the libusb header file on your system.
You may need to set the CPPFLAGS environment variable to include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/libmtp.pc new/libmtp-1.0.6/libmtp.pc
--- old/libmtp-1.0.4/libmtp.pc 2011-01-09 00:33:20.000000000 +0100
+++ new/libmtp-1.0.6/libmtp.pc 2011-02-12 13:18:36.000000000 +0100
@@ -1,13 +1,13 @@
# libmtp pkg-config source file
-prefix=/usr
+prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Name: libmtp
Description: libmtp is a library for accessing Media Transfer Protocol devices
-Version: 1.0.4
+Version: 1.0.6
Requires: libusb
Conflicts:
Libs: -L${libdir} -lmtp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/m4/iconv.m4 new/libmtp-1.0.6/m4/iconv.m4
--- old/libmtp-1.0.4/m4/iconv.m4 1970-01-01 01:00:00.000000000 +0100
+++ new/libmtp-1.0.6/m4/iconv.m4 2011-02-12 13:16:47.000000000 +0100
@@ -0,0 +1,195 @@
+# iconv.m4 serial 11 (gettext-0.18.1)
+dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include
+#include ],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include
+#include ],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include
+#include
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
+dnl avoid warnings like
+dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
+dnl This is tricky because of the way 'aclocal' is implemented:
+dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
+dnl Otherwise aclocal's initial scan pass would miss the macro definition.
+dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
+dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
+dnl warnings.
+m4_define([gl_iconv_AC_DEFUN],
+ m4_version_prereq([2.64],
+ [[AC_DEFUN_ONCE(
+ [$1], [$2])]],
+ [[AC_DEFUN(
+ [$1], [$2])]]))
+gl_iconv_AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_TRY_COMPILE([
+#include
+#include
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/Makefile.am new/libmtp-1.0.6/src/Makefile.am
--- old/libmtp-1.0.4/src/Makefile.am 2011-01-09 00:32:15.000000000 +0100
+++ new/libmtp-1.0.6/src/Makefile.am 2011-02-12 13:16:47.000000000 +0100
@@ -1,7 +1,7 @@
lib_LTLIBRARIES=libmtp.la
libmtp_la_SOURCES=libmtp.c unicode.c unicode.h util.c util.h playlist-spl.c \
libusb-glue.c libusb-glue.h \
- gphoto2-endian.h libptp-stdint.h ptp.c ptp.h \
+ gphoto2-endian.h _stdint.h ptp.c ptp.h \
music-players.h device-flags.h playlist-spl.h
include_HEADERS=libmtp.h
EXTRA_DIST=libmtp.h.in libmtp.sym ptp-pack.c
@@ -30,7 +30,7 @@
# ---------------------------------------------------------------------------
CURRENT=11
AGE=3
-REVISION=4
+REVISION=6
SOVERSION=$(CURRENT):$(REVISION):$(AGE)
LT_CURRENT_MINUS_AGE=`expr $(CURRENT) - $(AGE)`
@@ -58,4 +58,4 @@
libmtp_la_LIBADD=$(W32_LIBS) $(LTLIBICONV)
libmtp_la_DEPENDENCIES=$(srcdir)/libmtp.sym
-DISTCLEANFILES = _stdint.h
+DISTCLEANFILES = _stdint.h gphoto2-endian.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/_stdint.h new/libmtp-1.0.6/src/_stdint.h
--- old/libmtp-1.0.4/src/_stdint.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libmtp-1.0.6/src/_stdint.h 2011-02-12 13:18:25.000000000 +0100
@@ -0,0 +1,2 @@
+/* This file is generated automatically by configure */
+#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/gphoto2-endian.h new/libmtp-1.0.6/src/gphoto2-endian.h
--- old/libmtp-1.0.4/src/gphoto2-endian.h 2011-01-09 00:33:16.000000000 +0100
+++ new/libmtp-1.0.6/src/gphoto2-endian.h 2011-02-12 13:18:26.000000000 +0100
@@ -1,5 +1,5 @@
/* This file is generated automatically by configure */
-/* It is valid only for the system type powerpc64-suse-linux-gnu */
+/* It is valid only for the system type powerpc64-unknown-linux-gnu */
#ifndef __BYTEORDER_H
#define __BYTEORDER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/libmtp.h new/libmtp-1.0.6/src/libmtp.h
--- old/libmtp-1.0.4/src/libmtp.h 2011-01-09 00:33:18.000000000 +0100
+++ new/libmtp-1.0.6/src/libmtp.h 2011-02-12 13:18:34.000000000 +0100
@@ -29,8 +29,8 @@
#ifndef LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_H_INCLUSION_GUARD
-#define LIBMTP_VERSION 1.0.4
-#define LIBMTP_VERSION_STRING "1.0.4"
+#define LIBMTP_VERSION 1.0.6
+#define LIBMTP_VERSION_STRING "1.0.6"
/* This handles MSVC pecularities */
#ifdef _MSC_VER
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/libptp-stdint.h new/libmtp-1.0.6/src/libptp-stdint.h
--- old/libmtp-1.0.4/src/libptp-stdint.h 2008-11-20 11:55:26.000000000 +0100
+++ new/libmtp-1.0.6/src/libptp-stdint.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-/* This file is generated automatically by configure */
-#include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/libusb-glue.c new/libmtp-1.0.6/src/libusb-glue.c
--- old/libmtp-1.0.4/src/libusb-glue.c 2010-12-19 12:07:35.000000000 +0100
+++ new/libmtp-1.0.6/src/libusb-glue.c 2011-02-07 13:24:49.000000000 +0100
@@ -3,7 +3,7 @@
* Low-level USB interface glue towards libusb.
*
* Copyright (C) 2005-2007 Richard A. Low
- * Copyright (C) 2005-2010 Linus Walleij
+ * Copyright (C) 2005-2011 Linus Walleij
* Copyright (C) 2006-2007 Marcus Meissner
* Copyright (C) 2007 Ted Bullock
* Copyright (C) 2008 Chris Bagwell
@@ -229,13 +229,18 @@
unsigned char buf[1024], cmd;
int i;
int ret;
+ /* This is to indicate if we find some vendor interface */
+ int found_vendor_spec_interface = 0;
/*
- * Don't examine hubs or HID devices, no point in that.
- * (Some Kensington mice really don't like this.)
+ * Don't examine devices that are not likely to
+ * contain any MTP interface, update this the day
+ * you find some weird combination...
*/
- if (dev->descriptor.bDeviceClass == USB_CLASS_HUB ||
- dev->descriptor.bDeviceClass == USB_CLASS_HID) {
+ if (!(dev->descriptor.bDeviceClass == USB_CLASS_PER_INTERFACE ||
+ dev->descriptor.bDeviceClass == USB_CLASS_COMM ||
+ dev->descriptor.bDeviceClass == USB_CLASS_PTP ||
+ dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC)) {
return 0;
}
@@ -270,20 +275,40 @@
&dev->config[i].interface[j].altsetting[k];
/*
+ * We only want to probe for the OS descriptor if the
+ * device is USB_CLASS_VENDOR_SPEC or one of the interfaces
+ * in it is, so flag if we find an interface like this.
+ */
+ if (intf->bInterfaceClass == USB_CLASS_VENDOR_SPEC) {
+ found_vendor_spec_interface = 1;
+ }
+
+ /*
* Check for Still Image Capture class with PIMA 15740 protocol,
* also known as PTP
*/
+#if 0
if (intf->bInterfaceClass == USB_CLASS_PTP
&& intf->bInterfaceSubClass == 0x01
&& intf->bInterfaceProtocol == 0x01) {
if (dumpfile != NULL) {
- fprintf(dumpfile, "Configuration %d, interface %d, altsetting %d:\n", i, j, k);
- fprintf(dumpfile, " Interface implements PTP class,"
- " no further probing.\n");
+ fprintf(dumpfile, " Found PTP device, check vendor "
+ "extension...\n");
+ }
+ // This is where we may insert code to open a PTP
+ // session and query the vendor extension ID to see
+ // if it is 0xffffffff, i.e. MTP according to the spec.
+ if (was_mtp_extension) {
+ usb_close(devh);
+ return 1;
}
- usb_close(devh);
- return 1;
}
+#endif
+
+ /*
+ * Next we search for the MTP substring in the interface name.
+ * For example : "RIM MS/MTP" should work.
+ */
buf[0] = '\0';
ret = usb_get_string_simple(devh,
dev->config[i].interface[j].altsetting[k].iInterface,
@@ -291,8 +316,6 @@
1024);
if (ret < 3)
continue;
- // We search for the MTP string.
- // For example : "RIM MS/MTP" should work.
if (strstr((char *) buf, "MTP") != NULL) {
if (dumpfile != NULL) {
fprintf(dumpfile, "Configuration %d, interface %d, altsetting %d:\n", i, j, k);
@@ -329,103 +352,126 @@
LIBMTP_INFO("dev->config is NULL in probe_device_descriptor yet dev->descriptor.bNumConfigurations > 0\n");
}
- /* Read the special descriptor */
- ret = usb_get_descriptor(devh, 0x03, 0xee, buf, sizeof(buf));
+ /*
+ * Only probe for OS descriptor if the device is vendor specific
+ * or one of the interfaces found is.
+ */
+ if (dev->descriptor.bDeviceClass == USB_CLASS_VENDOR_SPEC ||
+ found_vendor_spec_interface) {
- // Dump it, if requested
- if (dumpfile != NULL && ret > 0) {
- fprintf(dumpfile, "Microsoft device descriptor 0xee:\n");
- data_dump_ascii(dumpfile, buf, ret, 16);
- }
+ /* Read the special descriptor */
+ ret = usb_get_descriptor(devh, 0x03, 0xee, buf, sizeof(buf));
- /* Check if descriptor length is at least 10 bytes */
- if (ret < 10) {
- usb_close(devh);
- return 0;
- }
+ /*
+ * If something failed we're probably stalled to we need
+ * to clear the stall off the endpoint and say this is not
+ * MTP.
+ */
+ if (ret < 0) {
+ /* EP0 is the default control endpoint */
+ usb_clear_halt(devh, 0);
+ usb_close(devh);
+ return 0;
+ }
- /* Check if this device has a Microsoft Descriptor */
- if (!((buf[2] == 'M') && (buf[4] == 'S') &&
- (buf[6] == 'F') && (buf[8] == 'T'))) {
- usb_close(devh);
- return 0;
- }
+ // Dump it, if requested
+ if (dumpfile != NULL && ret > 0) {
+ fprintf(dumpfile, "Microsoft device descriptor 0xee:\n");
+ data_dump_ascii(dumpfile, buf, ret, 16);
+ }
- /* Check if device responds to control message 1 or if there is an error */
- cmd = buf[16];
- ret = usb_control_msg (devh,
- USB_ENDPOINT_IN | USB_RECIP_DEVICE | USB_TYPE_VENDOR,
- cmd,
- 0,
- 4,
- (char *) buf,
- sizeof(buf),
- USB_TIMEOUT_DEFAULT);
-
- // Dump it, if requested
- if (dumpfile != NULL && ret > 0) {
- fprintf(dumpfile, "Microsoft device response to control message 1, CMD 0x%02x:\n", cmd);
- data_dump_ascii(dumpfile, buf, ret, 16);
- }
+ /* Check if descriptor length is at least 10 bytes */
+ if (ret < 10) {
+ usb_close(devh);
+ return 0;
+ }
- /* If this is true, the device either isn't MTP or there was an error */
- if (ret <= 0x15) {
- /* TODO: If there was an error, flag it and let the user know somehow */
- /* if(ret == -1) {} */
- usb_close(devh);
- return 0;
- }
+ /* Check if this device has a Microsoft Descriptor */
+ if (!((buf[2] == 'M') && (buf[4] == 'S') &&
+ (buf[6] == 'F') && (buf[8] == 'T'))) {
+ usb_close(devh);
+ return 0;
+ }
- /* Check if device is MTP or if it is something like a USB Mass Storage
- device with Janus DRM support */
- if ((buf[0x12] != 'M') || (buf[0x13] != 'T') || (buf[0x14] != 'P')) {
- usb_close(devh);
- return 0;
- }
+ /* Check if device responds to control message 1 or if there is an error */
+ cmd = buf[16];
+ ret = usb_control_msg (devh,
+ USB_ENDPOINT_IN | USB_RECIP_DEVICE | USB_TYPE_VENDOR,
+ cmd,
+ 0,
+ 4,
+ (char *) buf,
+ sizeof(buf),
+ USB_TIMEOUT_DEFAULT);
+
+ // Dump it, if requested
+ if (dumpfile != NULL && ret > 0) {
+ fprintf(dumpfile, "Microsoft device response to control message 1, CMD 0x%02x:\n", cmd);
+ data_dump_ascii(dumpfile, buf, ret, 16);
+ }
+
+ /* If this is true, the device either isn't MTP or there was an error */
+ if (ret <= 0x15) {
+ /* TODO: If there was an error, flag it and let the user know somehow */
+ /* if(ret == -1) {} */
+ usb_close(devh);
+ return 0;
+ }
- /* After this point we are probably dealing with an MTP device */
+ /* Check if device is MTP or if it is something like a USB Mass Storage
+ device with Janus DRM support */
+ if ((buf[0x12] != 'M') || (buf[0x13] != 'T') || (buf[0x14] != 'P')) {
+ usb_close(devh);
+ return 0;
+ }
- /*
- * Check if device responds to control message 2, which is
- * the extended device parameters. Most devices will just
- * respond with a copy of the same message as for the first
- * message, some respond with zero-length (which is OK)
- * and some with pure garbage. We're not parsing the result
- * so this is not very important.
- */
- ret = usb_control_msg (devh,
- USB_ENDPOINT_IN | USB_RECIP_DEVICE | USB_TYPE_VENDOR,
- cmd,
- 0,
- 5,
- (char *) buf,
- sizeof(buf),
- USB_TIMEOUT_DEFAULT);
-
- // Dump it, if requested
- if (dumpfile != NULL && ret > 0) {
- fprintf(dumpfile, "Microsoft device response to control message 2, CMD 0x%02x:\n", cmd);
- data_dump_ascii(dumpfile, buf, ret, 16);
- }
+ /* After this point we are probably dealing with an MTP device */
+
+ /*
+ * Check if device responds to control message 2, which is
+ * the extended device parameters. Most devices will just
+ * respond with a copy of the same message as for the first
+ * message, some respond with zero-length (which is OK)
+ * and some with pure garbage. We're not parsing the result
+ * so this is not very important.
+ */
+ ret = usb_control_msg (devh,
+ USB_ENDPOINT_IN | USB_RECIP_DEVICE | USB_TYPE_VENDOR,
+ cmd,
+ 0,
+ 5,
+ (char *) buf,
+ sizeof(buf),
+ USB_TIMEOUT_DEFAULT);
+
+ // Dump it, if requested
+ if (dumpfile != NULL && ret > 0) {
+ fprintf(dumpfile, "Microsoft device response to control message 2, CMD 0x%02x:\n", cmd);
+ data_dump_ascii(dumpfile, buf, ret, 16);
+ }
- /* If this is true, the device errored against control message 2 */
- if (ret == -1) {
- /* TODO: Implement callback function to let managing program know there
- was a problem, along with description of the problem */
- LIBMTP_ERROR("Potential MTP Device with VendorID:%04x and "
- "ProductID:%04x encountered an error responding to "
- "control message 2.\n"
- "Problems may arrise but continuing\n",
- dev->descriptor.idVendor, dev->descriptor.idProduct);
- } else if (dumpfile != NULL && ret == 0) {
- fprintf(dumpfile, "Zero-length response to control message 2 (OK)\n");
- } else if (dumpfile != NULL) {
- fprintf(dumpfile, "Device responds to control message 2 with some data.\n");
+ /* If this is true, the device errored against control message 2 */
+ if (ret == -1) {
+ /* TODO: Implement callback function to let managing program know there
+ was a problem, along with description of the problem */
+ LIBMTP_ERROR("Potential MTP Device with VendorID:%04x and "
+ "ProductID:%04x encountered an error responding to "
+ "control message 2.\n"
+ "Problems may arrise but continuing\n",
+ dev->descriptor.idVendor, dev->descriptor.idProduct);
+ } else if (dumpfile != NULL && ret == 0) {
+ fprintf(dumpfile, "Zero-length response to control message 2 (OK)\n");
+ } else if (dumpfile != NULL) {
+ fprintf(dumpfile, "Device responds to control message 2 with some data.\n");
+ }
+ /* Close the USB device handle */
+ usb_close(devh);
+ return 1;
}
/* Close the USB device handle */
usb_close(devh);
- return 1;
+ return 0;
}
/**
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/music-players.h new/libmtp-1.0.6/src/music-players.h
--- old/libmtp-1.0.4/src/music-players.h 2011-01-09 00:32:15.000000000 +0100
+++ new/libmtp-1.0.6/src/music-players.h 2011-02-12 13:16:47.000000000 +0100
@@ -3,7 +3,7 @@
* List of music players as USB ids.
*
* Copyright (C) 2005-2007 Richard A. Low
- * Copyright (C) 2005-2010 Linus Walleij
+ * Copyright (C) 2005-2011 Linus Walleij
* Copyright (C) 2006-2007 Marcus Meissner
* Copyright (C) 2007 Ted Bullock
*
@@ -228,7 +228,7 @@
// From Santi Béjar - not sure this is MTP...
// { "Samsung", 0x04e8, "E250 Mobile Phone", 0x663e, DEVICE_FLAG_UNLOAD_DRIVER },
// From an anonymous SF user
- { "Samsung", 0x04e8, "M7600 Beat/GT-S8300T", 0x6642,
+ { "Samsung", 0x04e8, "M7600 Beat/GT-S8300T/SGH-F490", 0x6642,
DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_BATTERY_LEVEL },
// From Lionel Bouton
{ "Samsung", 0x04e8, "X830 Mobile Phone", 0x6702, DEVICE_FLAG_UNLOAD_DRIVER },
@@ -244,6 +244,10 @@
// Added by Greg Fitzgerald
{ "Samsung", 0x04e8, "SAMSUNG Trance", 0x6763, DEVICE_FLAG_UNLOAD_DRIVER |
DEVICE_FLAG_NO_ZERO_READS | DEVICE_FLAG_PLAYLIST_SPL_V1 },
+ // From anonymous sourceforge user
+ // Guessing on .spl flag, maybe needs NO_ZERO_READS, whatdoIknow
+ { "Samsung", 0x04e8, "GT-S8500", 0x6819,
+ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_PLAYLIST_SPL_V1 },
// From: Erik Berglund
// Logs indicate this needs DEVICE_FLAG_NO_ZERO_READS
// https://sourceforge.net/tracker/?func=detail&atid=809061&aid=3026337&group_id=158745
@@ -267,8 +271,10 @@
{ "Microsoft", 0x045e, "Windows MTP Simulator", 0x0622, DEVICE_FLAG_NONE },
// Reported by Edward Hutchins (used for Zune HDs)
{ "Microsoft", 0x045e, "Zune HD", 0x063e, DEVICE_FLAG_NONE },
+ // Reported by anonymous sourceforge user
+ { "Microsoft", 0x045e, "Kin 1", 0x0640, DEVICE_FLAG_NONE },
// Reported by Farooq Zaman (used for all Zunes)
- { "Microsoft", 0x045e, "Zune", 0x0710, DEVICE_FLAG_NONE },
+ { "Microsoft", 0x045e, "Zune", 0x0710, DEVICE_FLAG_NONE },
/*
* JVC
@@ -1132,6 +1138,12 @@
DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST |
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL |
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
+ // Reported by anonymous user
+ { "Motorola", 0x22b8, "DROID2", 0x42a7,
+ DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST |
+ DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST |
+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL |
+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by Marcus Meissner to libptp2
{ "Motorola", 0x22b8, "K1", 0x4811, DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST },
// Reported by Hans-Joachim Baader to libptp2
@@ -1199,6 +1211,8 @@
DEVICE_FLAG_BROKEN_BATTERY_LEVEL | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST |
DEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
+ // Reported by anonymous user
+ { "Conceptronic", 0x1e53, "CMTD2", 0x0005, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by Demadridsur
{ "O2 Sistemas", 0x1e53, "ZoltarTV", 0x0006, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by da-beat
@@ -1239,6 +1253,10 @@
{ "Apple", 0x05ac, "iPod Touch 3rd Gen", 0x1299, DEVICE_FLAG_NONE },
{ "Apple", 0x05ac, "iPad", 0x129a, DEVICE_FLAG_NONE },
+ // Reported by anonymous SourceForge user
+ { "Curitel Communications, Inc.", 0x106c,
+ "Verizon Wireless Device", 0x3215, DEVICE_FLAG_NONE },
+
/*
* Other strange stuff.
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/ptp-pack.c new/libmtp-1.0.6/src/ptp-pack.c
--- old/libmtp-1.0.4/src/ptp-pack.c 2010-12-19 12:07:35.000000000 +0100
+++ new/libmtp-1.0.6/src/ptp-pack.c 2011-02-12 13:16:47.000000000 +0100
@@ -4,9 +4,6 @@
#include
#endif
-extern void
-ptp_debug (PTPParams *params, const char *format, ...);
-
static inline uint16_t
htod16p (PTPParams *params, uint16_t var)
{
@@ -1643,6 +1640,7 @@
ptp_debug (params, "event %d: EOS event CameraStatusChanged (size %d)", i, size);
(*ce)[i].type = PTP_CANON_EOS_CHANGES_TYPE_CAMERASTATUS;
(*ce)[i].u.status = dtoh32a(curdata+8);
+ params->eos_camerastatus = dtoh32a(curdata+8);
break;
case 0: /* end marker */
if (size == 8) /* no output */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/ptp.c new/libmtp-1.0.6/src/ptp.c
--- old/libmtp-1.0.4/src/ptp.c 2010-12-19 12:07:35.000000000 +0100
+++ new/libmtp-1.0.6/src/ptp.c 2011-02-12 13:16:47.000000000 +0100
@@ -60,7 +60,7 @@
static uint16_t ptp_init_send_memory_handler(PTPDataHandler*,unsigned char*,unsigned long len);
static uint16_t ptp_exit_send_memory_handler (PTPDataHandler *handler);
-static void
+void
ptp_debug (PTPParams *params, const char *format, ...)
{
va_list args;
@@ -77,7 +77,7 @@
va_end (args);
}
-static void
+void
ptp_error (PTPParams *params, const char *format, ...)
{
va_list args;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/src/ptp.h new/libmtp-1.0.6/src/ptp.h
--- old/libmtp-1.0.4/src/ptp.h 2010-12-19 12:07:35.000000000 +0100
+++ new/libmtp-1.0.6/src/ptp.h 2011-02-12 13:16:47.000000000 +0100
@@ -1977,6 +1977,7 @@
int nrofbacklogentries;
int eos_captureenabled;
int eos_viewfinderenabled;
+ int eos_camerastatus;
/* PTP: Wifi profiles */
uint8_t wifi_profiles_version;
@@ -2495,6 +2496,9 @@
**/
#define ptp_canon_eos_zoom(params,x) ptp_generic_no_data(params,PTP_OC_CANON_EOS_Zoom,1,x)
#define ptp_canon_eos_zoomposition(params,x,y) ptp_generic_no_data(params,PTP_OC_CANON_EOS_ZoomPosition,2,x,y)
+
+#define ptp_canon_eos_remotereleaseon(params,x) ptp_generic_no_data(params,PTP_OC_CANON_EOS_RemoteReleaseOn,1,x)
+#define ptp_canon_eos_remotereleaseoff(params,x) ptp_generic_no_data(params,PTP_OC_CANON_EOS_RemoteReleaseOff,1,x)
/**
* ptp_nikon_mfdrive:
*
@@ -2621,6 +2625,9 @@
void ptp_free_object (PTPObject *oi);
void ptp_perror (PTPParams* params, uint16_t error);
+void ptp_debug (PTPParams *params, const char *format, ...);
+void ptp_error (PTPParams *params, const char *format, ...);
+
const char*
ptp_get_property_description(PTPParams* params, uint16_t dpc);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/util/Makefile.am new/libmtp-1.0.6/util/Makefile.am
--- old/libmtp-1.0.4/util/Makefile.am 2010-12-07 21:39:35.000000000 +0100
+++ new/libmtp-1.0.6/util/Makefile.am 2011-02-12 13:16:47.000000000 +0100
@@ -2,7 +2,8 @@
bin_PROGRAMS=mtp-hotplug
mtp_hotplug_SOURCES=mtp-hotplug.c
-libexec_PROGRAMS=mtp-probe
+mtp_probedir=@UDEV@
+mtp_probe_PROGRAMS=mtp-probe
mtp_probe_SOURCES=mtp-probe.c
endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/util/mtp-hotplug.c new/libmtp-1.0.6/util/mtp-hotplug.c
--- old/libmtp-1.0.4/util/mtp-hotplug.c 2011-01-09 00:32:15.000000000 +0100
+++ new/libmtp-1.0.6/util/mtp-hotplug.c 2011-02-12 13:16:47.000000000 +0100
@@ -2,7 +2,7 @@
* \file mtp-hotplug.c
* Program to create hotplug scripts.
*
- * Copyright (C) 2005-2010 Linus Walleij
+ * Copyright (C) 2005-2011 Linus Walleij
* Copyright (C) 2006-2008 Marcus Meissner
*
* This library is free software; you can redistribute it and/or
@@ -28,12 +28,15 @@
static void usage(void)
{
- fprintf(stderr, "usage: hotplug [-u -H -i -a\"ACTION\"]\n");
+ fprintf(stderr, "usage: hotplug [-u -H -i -a\"ACTION\"] -p\"DIR\" -g\"GROUP\" -m\"MODE\"\n");
fprintf(stderr, " -u: use udev syntax\n");
fprintf(stderr, " -o: use old udev syntax\n");
fprintf(stderr, " -H: use hal syntax\n");
fprintf(stderr, " -i: use usb.ids simple list syntax\n");
fprintf(stderr, " -a\"ACTION\": perform udev action ACTION on attachment\n");
+ fprintf(stderr, " -p\"DIR\": directory where mtp-probe will be installed\n");
+ fprintf(stderr, " -g\"GROUP\": file group for device nodes\n");
+ fprintf(stderr, " -m\"MODE\": file mode for device nodes\n");
exit(1);
}
@@ -66,11 +69,15 @@
char default_udev_action[] = "SYMLINK+=\"libmtp-%k\", ENV{ID_MTP_DEVICE}=\"1\", ENV{ID_MEDIA_PLAYER}=\"1\"";
char *action; // To hold the action actually used.
uint16_t last_vendor = 0x0000U;
+ char mtp_probe_dir[256];
+ char *udev_group= NULL;
+ char *udev_mode = NULL;
- while ( (opt = getopt(argc, argv, "uoUiHa:")) != -1 ) {
+ while ( (opt = getopt(argc, argv, "uoiHa:p:g:m:")) != -1 ) {
switch (opt) {
case 'a':
udev_action = strdup(optarg);
+ break;
case 'u':
style = style_udev;
break;
@@ -83,7 +90,34 @@
case 'i':
style = style_usbids;
break;
- default:
+ case 'p':
+ strncpy(mtp_probe_dir,optarg,sizeof(mtp_probe_dir));
+ mtp_probe_dir[sizeof(mtp_probe_dir)-1] = '\0';
+ if (strlen(mtp_probe_dir) <= 1) {
+ printf("Supply some sane mtp-probe dir\n");
+ exit(1);
+ }
+ /* Make sure the dir ends with '/' */
+ if (mtp_probe_dir[strlen(mtp_probe_dir)-1] != '/') {
+ int index = strlen(mtp_probe_dir);
+ if (index >= (sizeof(mtp_probe_dir)-1)) {
+ exit(1);
+ }
+ mtp_probe_dir[index] = '/';
+ mtp_probe_dir[index+1] = '\0';
+ }
+ /* Don't add the standard udev path... */
+ if (!strcmp(mtp_probe_dir, "/lib/udev/")) {
+ mtp_probe_dir[0] = '\0';
+ }
+ break;
+ case 'g':
+ udev_group = strdup(optarg);
+ break;
+ case 'm':
+ udev_mode = strdup(optarg);
+ break;
+ default:
usage();
}
}
@@ -139,7 +173,10 @@
case style_udev:
case style_udev_old:
printf("# %s %s\n", entry->vendor, entry->product);
- printf("ATTR{idVendor}==\"%04x\", ATTR{idProduct}==\"%04x\", %s\n", entry->vendor_id, entry->product_id, action);
+ printf("ATTR{idVendor}==\"%04x\", ATTR{idProduct}==\"%04x\", %s", entry->vendor_id, entry->product_id, action);
+ if (udev_group != NULL) printf(", GROUP=\"%s\"", udev_group);
+ if (udev_mode != NULL) printf(", MODE=\"%s\"", udev_mode);
+ printf("\n");
break;
case style_usbmap:
printf("# %s %s\n", entry->vendor, entry->product);
@@ -204,9 +241,12 @@
* This is code that invokes the mtp-probe program on
* every USB device that is either PTP or vendor specific
*/
- printf("\n# Autoprobe vendor-specific and PTP devices\n");
- printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"00|06|ff\", PROGRAM=\"/lib/udev/mtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s\n", action);
- printf("\nLABEL=\"libmtp_rules_end\"\n");
+ printf("\n# Autoprobe vendor-specific, communication and PTP devices\n");
+ printf("ENV{ID_MTP_DEVICE}!=\"1\", ATTR{bDeviceClass}==\"00|02|06|ff\", PROGRAM=\"%smtp-probe /sys$env{DEVPATH} $attr{busnum} $attr{devnum}\", RESULT==\"1\", %s", mtp_probe_dir, action);
+ if (udev_group != NULL) printf(", GROUP=\"%s\"", udev_group);
+ if (udev_mode != NULL) printf(", MODE=\"%s\"", udev_mode);
+ printf("\n");
+ printf("\nLABEL=\"libmtp_rules_end\"\n");
break;
case style_hal:
printf(" </match>\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libmtp-1.0.4/util/mtp-probe.c new/libmtp-1.0.6/util/mtp-probe.c
--- old/libmtp-1.0.4/util/mtp-probe.c 2010-12-05 15:00:34.000000000 +0100
+++ new/libmtp-1.0.6/util/mtp-probe.c 2011-01-30 08:18:16.000000000 +0100
@@ -19,7 +19,7 @@
* Exits with status code 1 if the device is an MTP device,
* else exits with 0.
*
- * Copyright (C) 2010 Linus Walleij
+ * Copyright (C) 2011 Linus Walleij
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org