Deprecate command line export options.
authorWouter Verhelst <w@uter.be>
Fri, 18 Jun 2010 06:35:36 +0000 (08:35 +0200)
committerWouter Verhelst <w@uter.be>
Fri, 18 Jun 2010 06:35:36 +0000 (08:35 +0200)
nbd-server.1.sgml
nbd-server.c

index 7219a9c..008176d 100644 (file)
@@ -86,6 +86,11 @@ manpage.1: manpage.sgml
     This file must list the IP-addresses of clients that are allowed
     to connect. If it does not exist, all clients are able to connect.
     If the file is empty, no clients can connect.</para>
+
+    <para>Note that while the command line allows for specifying an
+    export, the use of this option is deprecated. It is preferred to
+    make use of a configuration file instead, the format of which is
+    defined in nbd-server(5).</para>
   </refsect1>
   <refsect1>
     <title>OPTIONS</title>
index 0800941..52f777d 100644 (file)
@@ -1924,7 +1924,11 @@ int main(int argc, char *argv[]) {
                g_warning("Could not parse config file: %s", 
                                err ? err->message : "Unknown error");
        }
-    
+       if(serve) {
+               g_warning("Specifying an export on the command line is deprecated.");
+               g_warning("Please use a configuration file instead.");
+       }
+
        if((!serve) && (!servers||!servers->len)) {
                g_message("Nothing to do! Bye!");
                exit(EXIT_FAILURE);