2001-10-03 Lutz M�ller <urc8@rz.uni-karlsruhe.de>
* serial/unix.c: Correctly interpret the return value of dev_[un]lock git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@2364 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2001-10-03 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* serial/unix.c: Correctly interpret the return value of dev_[un]lock
|
||||
|
||||
2001-10-03 Lutz Müller <urc8@rz.uni-karlsruhe.de>
|
||||
|
||||
* test/gphoto2-port-test.c: Renamed into
|
||||
|
||||
@@ -143,8 +143,15 @@ gp_port_serial_lock (gp_port *dev, const char *port)
|
||||
if (!pid)
|
||||
return (GP_OK);
|
||||
|
||||
gp_port_debug_printf (GP_DEBUG_LOW, dev->debug_level, "Device '%s' is "
|
||||
"locked by pid %d.", port, pid);
|
||||
/* Tell the user what went wrong */
|
||||
if (pid > 0)
|
||||
gp_port_debug_printf (GP_DEBUG_LOW, dev->debug_level, "Device "
|
||||
"'%s' is locked by pid %d.", port, pid);
|
||||
else
|
||||
gp_port_debug_printf (GP_DEBUG_LOW, dev->debug_level,
|
||||
"dev_lock on '%s' returned %d.",
|
||||
port, pid);
|
||||
|
||||
return (GP_ERROR_IO_LOCK);
|
||||
|
||||
#else /* !HAVE_LOCKDEV */
|
||||
@@ -291,8 +298,15 @@ gp_port_serial_unlock (gp_port *dev)
|
||||
if (!pid)
|
||||
return (GP_OK);
|
||||
|
||||
gp_port_debug_printf (GP_DEBUG_LOW, dev->debug_level, "Device '%s' is "
|
||||
"locked by pid %d.", port, pid);
|
||||
/* Tell the user what went wrong */
|
||||
if (pid > 0)
|
||||
gp_port_debug_printf (GP_DEBUG_LOW, dev->debug_level, "Device "
|
||||
"'%s' is locked by pid %d.", port, pid);
|
||||
else
|
||||
gp_port_debug_printf (GP_DEBUG_LOW, dev->debug_level,
|
||||
"dev_unlock on '%s' returned %d.",
|
||||
port, pid);
|
||||
|
||||
return (GP_ERROR_IO_LOCK);
|
||||
|
||||
#else /* !HAVE_LOCKDEV */
|
||||
|
||||
Reference in New Issue
Block a user