Ho Wouter,

Thanks for you reply,

> I'd appreciate it if you could update against the latest upstream.
> I'd do it myself, but I don't have much time these days

Hereby a patch, relative to the latest (?) git tree:

Regards,

Rogier.

------------------------------------------------------
diff --git a/nbd-server.c b/nbd-server.c
index feb0ca6..e7734ce 100644
--- a/nbd-server.c
+++ b/nbd-server.c
@@ -904,8 +904,7 @@ GArray* parse_cfile(gchar* f, struct generic_conf *const 
genconf, GError** e) {
        cfile = g_key_file_new();
        retval = g_array_new(FALSE, TRUE, sizeof(SERVER));
        if(!g_key_file_load_from_file(cfile, f, G_KEY_FILE_KEEP_COMMENTS |
-                       G_KEY_FILE_KEEP_TRANSLATIONS, &err)) {
-               g_set_error(e, NBDS_ERR, NBDS_ERR_CFILE_NOTFOUND, "Could not 
open config file %s.", 
f);
+                       G_KEY_FILE_KEEP_TRANSLATIONS, e)) {
                g_key_file_free(cfile);
                return retval;
        }
@@ -2702,6 +2701,7 @@ int main(int argc, char *argv[]) {
        GArray *servers;
        GError *err=NULL;
         struct generic_conf genconf;
+       bool error_reported=false;
 
         memset(&genconf, 0, sizeof(struct generic_conf));
 
@@ -2752,10 +2752,11 @@ int main(int argc, char *argv[]) {
        }
     
        if(!servers || !servers->len) {
-                if(err && !(err->domain == NBDS_ERR
-                            && err->code == NBDS_ERR_CFILE_NOTFOUND)) {
+                if(err && !(err->domain == G_FILE_ERROR
+                            && err->code == G_FILE_ERROR_NOENT)) {
                        g_warning("Could not parse config file: %s", 
                                        err ? err->message : "Unknown error");
+                       error_reported=true;
                }
        }
        if(serve) {
@@ -2764,7 +2765,8 @@ int main(int argc, char *argv[]) {
        }
 
        if((!serve) && (!servers||!servers->len)) {
-               g_message("No configured exports; quitting.");
+               if (!error_reported)
+                       g_message("No configured exports; quitting.");
                exit(EXIT_FAILURE);
        }
        if (!dontfork)

------------------------------------------------------


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to