#define PATH_BLOCK OBJECT_PATH"/Block"
#define PATH_BLOCK_MANAGER PATH_BLOCK"/Manager"
#define INTERFACE_BLOCK_MANAGER INTERFACE_NAME".BlockManager"
+#define PATH_PLUGIN_LIB PATH_LIBDIR"/libmedia-content-plugin.so"
#define DEVICE_METHOD "GetDeviceList"
#define DEVICE_USB "scsi"
char *insert_stg_id = NULL;
char *err_msg = NULL;
- funcHandle = dlopen("/usr/lib/libmedia-content-plugin.so", RTLD_LAZY);
+ funcHandle = dlopen(PATH_PLUGIN_LIB, RTLD_LAZY);
if (funcHandle == NULL) {
- funcHandle = dlopen("/usr/lib64/libmedia-content-plugin.so", RTLD_LAZY);
- if (funcHandle == NULL) {
- printf("Error when open plug-in\n");
- return -1;
- }
+ printf("Error when open plug-in\n");
+ return -1;
}
svc_connect = dlsym(funcHandle, "connect_db");
char *err_msg = NULL;
int ret = 0;
- funcHandle = dlopen("/usr/lib/libmedia-content-plugin.so", RTLD_LAZY);
+ funcHandle = dlopen(PATH_PLUGIN_LIB, RTLD_LAZY);
if (funcHandle == NULL) {
- funcHandle = dlopen("/usr/lib64/libmedia-content-plugin.so", RTLD_LAZY);
- if (funcHandle == NULL) {
- printf("Error when open plug-in\n");
- return;
- }
+ printf("Error when open plug-in\n");
+ return;
}
svc_connect = dlsym(funcHandle, "connect_db");
return -1;
}
- funcHandle = dlopen("/usr/lib/libmedia-content-plugin.so", RTLD_LAZY);
+ funcHandle = dlopen(PATH_PLUGIN_LIB, RTLD_LAZY);
if (funcHandle == NULL) {
- funcHandle = dlopen("/usr/lib64/libmedia-content-plugin.so", RTLD_LAZY);
- if (funcHandle == NULL) {
- printf("Error when open plug-in\n");
- return -1;
- }
+ printf("Error when open plug-in\n");
+ return -1;
}
svc_connect = dlsym(funcHandle, "connect_db");