Logo Search packages:      
Sourcecode: libgphoto2 version File versions

int gp_port_info_list_load ( GPPortInfoList list  ) 

Load system ports.

Parameters:
list a GPPortInfoList
Searches the system for io-drivers and appends them to the list. You would normally call this function once after gp_port_info_list_new and then use this list in order to supply gp_port_set_info with parameters or to do autodetection.

Returns:
a gphoto2 error code

Definition at line 277 of file gphoto2-port-info-list.c.

References CHECK_NULL, gp_log(), GP_LOG_DEBUG, GP_OK, and IOLIBDIR_ENV.

Referenced by gp_camera_init().

{
      const char *iolibs_env = getenv(IOLIBDIR_ENV);
      const char *iolibs = (iolibs_env != NULL)?iolibs_env:IOLIBS;
      int result;

      CHECK_NULL (list);

      gp_log (GP_LOG_DEBUG, "gphoto2-port-info-list",
            _("Using ltdl to load io-drivers from '%s'..."),
            iolibs);
      lt_dlinit ();
      lt_dladdsearchdir (iolibs);
      result = lt_dlforeachfile (iolibs, foreach_func, list);
      lt_dlexit ();
      if (result < 0)
            return (result);
        return (GP_OK);
}


Generated by  Doxygen 1.6.0   Back to index