diff options
Diffstat (limited to 'sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp')
| -rw-r--r-- | sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp b/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp index 8d2a846a7f90..d1dbca44fbe2 100644 --- a/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp +++ b/sysutils/fusefs-simple-mtpfs/files/patch-src__simple-mtpfs-fuse.cpp @@ -1,26 +1,32 @@ ---- src/simple-mtpfs-fuse.cpp~ +# Allow fake device file to use with fstab(5) + +--- src/simple-mtpfs-fuse.cpp.orig 2015-08-24 11:34:39 UTC +++ src/simple-mtpfs-fuse.cpp -@@ -314,7 +314,7 @@ bool SMTPFileSystem::parseOptions(int ar +@@ -309,12 +309,6 @@ 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() +- // 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; +- return false; +- } +- + m_options.m_good = true; + return true; + } +@@ -379,11 +373,9 @@ bool SMTPFileSystem::exec() + return false; } - #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 +- } 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 - { ++ !m_device.connect(m_options.m_device_file)) { // Connect to MTP device by order number, if no device file supplied + if (!m_device.connect(m_options.m_device_no)) + return false; |
