ctdb-common: Avoid ENOENT for unknown conf type tags
authorMartin Schwenke <martin@meltin.net>
Thu, 30 Aug 2018 22:45:25 +0000 (08:45 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 3 Sep 2018 08:52:11 +0000 (10:52 +0200)
Only use ENOENT for missing configuration file.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13589

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/common/conf.c

index f673c61fa8d4bfb3b86cfa72f197850eebdfe7ca..2758d2628f25bf5192177ee3a5059c9e0b8ad9e3 100644 (file)
@@ -155,7 +155,7 @@ static int conf_value_from_string(TALLOC_CTX *mem_ctx,
                break;
 
        default:
-               return ENOENT;
+               return EINVAL;
        }
 
        return ret;
@@ -232,7 +232,7 @@ static int conf_value_copy(TALLOC_CTX *mem_ctx,
                break;
 
        default:
-               return ENOENT;
+               return EINVAL;
        }
 
        return 0;