More verbose error output for nutconfigure when conf bnot found

View: New views
3 Messages — Rating Filter:   Alert me  

More verbose error output for nutconfigure when conf bnot found

by Uwe Bonnes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

if the .conf file is not found, no verbose output was given.

Bye

--
Uwe Bonnes                bon@...

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
Index: nut/tools/nutconf/nutcomponent.c
===================================================================
--- nut/tools/nutconf/nutcomponent.c (Revision 2740)
+++ nut/tools/nutconf/nutcomponent.c (Arbeitskopie)
@@ -1941,9 +1941,14 @@
     int rc;
     lua_State *ls = (lua_State *)(repo->nr_ls);
 
-    if(ls == NULL || root == NULL || pathname == NULL || access(pathname, 0)) {
+    if(ls == NULL || root == NULL || pathname == NULL ) {
         return -1;
     }
+    if(access(pathname, 0)) {
+        sprintf(errtxt, "Failed to access %s", pathname);
+        errsts++;
+ return -1;
+    }
 
     /* Let the interpreter load the script file. */
     if ((rc = luaL_loadfile(ls, pathname)) != 0) {
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: More verbose error output for nutconfigure when conf bnot found

by Ethernut :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Uwe Bonnes wrote:
> if the .conf file is not found, no verbose output was given.

Wow! No message for days and suddenly...

Many thanks, Uwe. I'll try to catch up.

Initially I intended to give up changing the wxWidgets version in favor
of Thiago's qt version. However, it looks like more time is required
than I actually have to become familiar with this new environment.

Harald

_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion

Re: More verbose error output for nutconfigure when conf bnot found

by Uwe Bonnes :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>>> "Harald" == Harald Kipp <harald.kipp@...> writes:

    Harald> Uwe Bonnes wrote:
    >> if the .conf file is not found, no verbose output was given.

    Harald> Wow! No message for days and suddenly...

I tried to used recent SVN ethernut in my environment, after long time
using some frozen version. The patches are the result to gert recent SVN
going.

    Harald> Many thanks, Uwe. I'll try to catch up.

    Harald> Initially I intended to give up changing the wxWidgets version
    Harald> in favor of Thiago's qt version. However, it looks like more
    Harald> time is required than I actually have to become familiar with
    Harald> this new environment.

I use the nutconfigure command line tool, not the Qt or wxWidgets version.

Bye
--
Uwe Bonnes                bon@...

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------
_______________________________________________
http://lists.egnite.de/mailman/listinfo/en-nut-discussion