summaryrefslogtreecommitdiff
path: root/apps/plugin.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugin.c')
-rw-r--r--apps/plugin.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index d71102701a..b31988e9b4 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -191,7 +191,7 @@ int plugin_load(char* plugin, void* parameter)
191 pd = dlopen(path, RTLD_NOW); 191 pd = dlopen(path, RTLD_NOW);
192 if (!pd) { 192 if (!pd) {
193 snprintf(buf, sizeof buf, "Can't open %s", plugin); 193 snprintf(buf, sizeof buf, "Can't open %s", plugin);
194 splash(HZ*2, 0, true, buf); 194 splash(HZ*2, true, buf);
195 DEBUGF("dlopen(%s): %s\n",path,dlerror()); 195 DEBUGF("dlopen(%s): %s\n",path,dlerror());
196 dlclose(pd); 196 dlclose(pd);
197 return -1; 197 return -1;
@@ -201,7 +201,7 @@ int plugin_load(char* plugin, void* parameter)
201 if (!plugin_start) { 201 if (!plugin_start) {
202 plugin_start = dlsym(pd, "_plugin_start"); 202 plugin_start = dlsym(pd, "_plugin_start");
203 if (!plugin_start) { 203 if (!plugin_start) {
204 splash(HZ*2, 0, true, "Can't find entry point"); 204 splash(HZ*2, true, "Can't find entry point");
205 dlclose(pd); 205 dlclose(pd);
206 return -1; 206 return -1;
207 } 207 }
@@ -210,7 +210,7 @@ int plugin_load(char* plugin, void* parameter)
210 fd = open(plugin, O_RDONLY); 210 fd = open(plugin, O_RDONLY);
211 if (fd < 0) { 211 if (fd < 0) {
212 snprintf(buf, sizeof buf, str(LANG_PLUGIN_CANT_OPEN), plugin); 212 snprintf(buf, sizeof buf, str(LANG_PLUGIN_CANT_OPEN), plugin);
213 splash(HZ*2, 0, true, buf); 213 splash(HZ*2, true, buf);
214 return fd; 214 return fd;
215 } 215 }
216 216
@@ -220,12 +220,12 @@ int plugin_load(char* plugin, void* parameter)
220 if (plugin_size < 0) { 220 if (plugin_size < 0) {
221 /* read error */ 221 /* read error */
222 snprintf(buf, sizeof buf, str(LANG_READ_FAILED), plugin); 222 snprintf(buf, sizeof buf, str(LANG_READ_FAILED), plugin);
223 splash(HZ*2, 0, true, buf); 223 splash(HZ*2, true, buf);
224 return -1; 224 return -1;
225 } 225 }
226 if (plugin_size == 0) { 226 if (plugin_size == 0) {
227 /* loaded a 0-byte plugin, implying it's not for this model */ 227 /* loaded a 0-byte plugin, implying it's not for this model */
228 splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL)); 228 splash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL));
229 return -1; 229 return -1;
230 } 230 }
231#endif 231#endif
@@ -242,15 +242,15 @@ int plugin_load(char* plugin, void* parameter)
242 return PLUGIN_USB_CONNECTED; 242 return PLUGIN_USB_CONNECTED;
243 243
244 case PLUGIN_WRONG_API_VERSION: 244 case PLUGIN_WRONG_API_VERSION:
245 splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_VERSION)); 245 splash(HZ*2, true, str(LANG_PLUGIN_WRONG_VERSION));
246 break; 246 break;
247 247
248 case PLUGIN_WRONG_MODEL: 248 case PLUGIN_WRONG_MODEL:
249 splash(HZ*2, 0, true, str(LANG_PLUGIN_WRONG_MODEL)); 249 splash(HZ*2, true, str(LANG_PLUGIN_WRONG_MODEL));
250 break; 250 break;
251 251
252 default: 252 default:
253 splash(HZ*2, 0, true, str(LANG_PLUGIN_ERROR)); 253 splash(HZ*2, true, str(LANG_PLUGIN_ERROR));
254 break; 254 break;
255 } 255 }
256 256