* fallback to std open in list devices if resmgr is not running.

git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@6210 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
Marcus Meissner
2003-02-17 13:05:48 +00:00
parent 3099b1a1f3
commit 18f8289645

View File

@@ -337,14 +337,16 @@ gp_port_library_list (GPPortInfoList *list)
continue;
/* Device locked. Try to open the device. */
fd = -1;
#ifdef HAVE_RESMGR
/* resmgr has its own API, which calls to a server and
* communicates over UNIX domain sockets.
*/
fd = rsm_open_device(path, O_RDONLY | O_NDELAY);
#else
fd = open (path, O_RDONLY | O_NDELAY);
/* fall through to standard open if this failed */
#endif
if (fd == -1)
fd = open (path, O_RDONLY | O_NDELAY);
if (fd < 0) {
gp_port_serial_unlock (NULL, path);
continue;