summaryrefslogtreecommitdiff
path: root/libgphoto2_port/libgphoto2_port
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <gp@n-dimensional.de>2007-08-14 12:57:04 +0000
committerHans Ulrich Niedermann <gp@n-dimensional.de>2007-08-14 12:57:04 +0000
commitd4ec14fa2c1a01badc626e13a4555c0ceba48175 (patch)
tree2fec43cebaf06b6c7864ca80ab7d9178fc4adb26 /libgphoto2_port/libgphoto2_port
parent85df1337a916861ea23111eb947eae9c9dc7323e (diff)
downloadlibgphoto2-d4ec14fa2c1a01badc626e13a4555c0ceba48175.tar.gz
mvoe definition of IOLIBDIR_ENV; insist on at least one iolib loading successfully
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10584 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'libgphoto2_port/libgphoto2_port')
-rw-r--r--libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c
index c0055b807..0a12fe19b 100644
--- a/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c
+++ b/libgphoto2_port/libgphoto2_port/gphoto2-port-info-list.c
@@ -67,19 +67,12 @@
struct _GPPortInfoList {
GPPortInfo *info;
unsigned int count;
+ unsigned int iolib_count;
};
#define CHECK_NULL(x) {if (!(x)) return (GP_ERROR_BAD_PARAMETERS);}
#define CR(x) {int r=(x);if (r<0) return (r);}
-/**
- * IOLIBDIR_ENV:
- *
- * Name of the environment variable which may contain the path where
- * to look for the IO libs. If this environment variable is not defined,
- * use the compiled-in default constant.
- **/
-#define IOLIBDIR_ENV "IOLIBS"
/**
* \brief Specify codeset for translations
@@ -247,6 +240,8 @@ foreach_func (const char *filename, lt_ptr data)
return (0);
}
+ list->iolib_count++;
+
for (j = old_size; j < list->count; j++){
gp_log (GP_LOG_DEBUG, "gphoto2-port-info-list",
_("Loaded '%s' ('%s') from '%s'."),
@@ -289,6 +284,10 @@ gp_port_info_list_load (GPPortInfoList *list)
lt_dlexit ();
if (result < 0)
return (result);
+ if (list->iolib_count == 0) {
+ gp_log (GP_LOG_ERROR, "No iolibs found in '%s'", iolibs);
+ return GP_ERROR_LIBRARY;
+ }
return (GP_OK);
}