opnsense-ports/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

26 lines
893 B
C++

--- src/simple-mtpfs-fuse.cpp~
+++ src/simple-mtpfs-fuse.cpp
@@ -314,7 +314,7 @@ bool SMTPFileSystem::parseOptions(int ar
--m_options.m_device_no;
-#ifdef HAVE_LIBUSB1
+#if 0 //def HAVE_LIBUSB1
// device file and -- device are mutually exclusive, fail if both set
if (m_options.m_device_no && m_options.m_device_file) {
m_options.m_good = false;
@@ -383,11 +383,9 @@ bool SMTPFileSystem::exec()
}
#ifdef HAVE_LIBUSB1
- if (m_options.m_device_file) {
- // Try to use device file first, if provided
- if (!m_device.connect(m_options.m_device_file))
- return false;
- } else
+ // Try to use device file first, ignore otherwise
+ if (!m_options.m_device_file ||
+ !m_device.connect(m_options.m_device_file))
#endif // HAVE_LIBUSB1
{
// Connect to MTP device by order number, if no device file supplied