summaryrefslogtreecommitdiff
path: root/libgphoto2_port/serial
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2008-11-06 23:27:22 +0000
committerMarcus Meissner <marcus@jet.franken.de>2008-11-06 23:27:22 +0000
commitc12ba54ba44db171e661a937b58ef0d7d93cbd05 (patch)
tree7fba774730f2da1e20a7155efbad95b2d9860b92 /libgphoto2_port/serial
parent2118973ddc0aac5fb978886907404d31f3485058 (diff)
downloadlibgphoto2-c12ba54ba44db171e661a937b58ef0d7d93cbd05.tar.gz
disable lock & open during "list ports" action.
just existence is sufficient for us, and the other steps take too much time. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11528 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/serial')
-rw-r--r--libgphoto2_port/serial/unix.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libgphoto2_port/serial/unix.c b/libgphoto2_port/serial/unix.c
index 106fc88a7..e15aa34c5 100644
--- a/libgphoto2_port/serial/unix.c
+++ b/libgphoto2_port/serial/unix.c
@@ -331,6 +331,7 @@ gp_port_library_list (GPPortInfoList *list)
if ((stat (path, &s) == -1) && ((errno == ENOENT) || (errno == ENODEV)))
continue;
+#if 0
/* First of all, try to lock the device */
if (gp_port_serial_lock (NULL, path) < 0)
continue;
@@ -347,8 +348,8 @@ gp_port_library_list (GPPortInfoList *list)
* it to the list.
*/
close (fd);
-
gp_port_serial_unlock (NULL, path);
+#endif
gp_port_info_new (&info);
gp_port_info_set_type (info, GP_PORT_SERIAL);
xname = malloc (strlen("serial:")+strlen(path)+1);