r291: make the build work, again
authoryoe <yoe>
Mon, 22 Oct 2007 00:46:11 +0000 (00:46 +0000)
committeryoe <yoe>
Mon, 22 Oct 2007 00:46:11 +0000 (00:46 +0000)
nbd-client.c
nbd-server.c

index d98f36e..51927b1 100644 (file)
@@ -241,7 +241,6 @@ int main(int argc, char *argv[]) {
        ++argv; --argc; /* skip port */
 
        if (argc==0) goto errmsg;
        ++argv; --argc; /* skip port */
 
        if (argc==0) goto errmsg;
-       sock = opennet(hostname, port);
        nbddev = argv[0];
        nbd = open(nbddev, O_RDWR);
        if (nbd < 0)
        nbddev = argv[0];
        nbd = open(nbddev, O_RDWR);
        if (nbd < 0)
@@ -268,6 +267,7 @@ int main(int argc, char *argv[]) {
                }
        }
        if(argc) goto errmsg;
                }
        }
        if(argc) goto errmsg;
+       sock = opennet(hostname, port, sdp);
        argv=NULL; argc=0; /* don't use it later suddenly */
 
        negotiate(sock, &size64, &flags);
        argv=NULL; argc=0; /* don't use it later suddenly */
 
        negotiate(sock, &size64, &flags);
@@ -297,7 +297,7 @@ int main(int argc, char *argv[]) {
 
                                        fprintf(stderr, " Reconnecting\n");
                                        close(sock); close(nbd);
 
                                        fprintf(stderr, " Reconnecting\n");
                                        close(sock); close(nbd);
-                                       sock = opennet(hostname, port);
+                                       sock = opennet(hostname, port, sdp);
                                        nbd = open(nbddev, O_RDWR);
                                        negotiate(sock, &new_size, &new_flags);
                                        if (size64 != new_size) {
                                        nbd = open(nbddev, O_RDWR);
                                        negotiate(sock, &new_size, &new_flags);
                                        if (size64 != new_size) {
index 37bcf22..4c6e8d3 100644 (file)
@@ -148,7 +148,7 @@ gchar* rungroup=NULL;
                            copyonwrite */
 #define F_AUTOREADONLY 8  /**< flag to tell us a file is set to autoreadonly */
 #define F_SPARSE 16      /**< flag to tell us copyronwrite should use a sparse file */
                            copyonwrite */
 #define F_AUTOREADONLY 8  /**< flag to tell us a file is set to autoreadonly */
 #define F_SPARSE 16      /**< flag to tell us copyronwrite should use a sparse file */
-#define F_SDP            /**< flag to tell us the export should be done using the Socket Direct Protocol for RDMA */
+#define F_SDP 32         /**< flag to tell us the export should be done using the Socket Direct Protocol for RDMA */
 GHashTable *children;
 char pidfname[256]; /**< name of our PID file */
 char pidftemplate[256]; /**< template to be used for the filename of the PID file */
 GHashTable *children;
 char pidfname[256]; /**< name of our PID file */
 char pidftemplate[256]; /**< template to be used for the filename of the PID file */
@@ -499,6 +499,7 @@ typedef enum {
        CFILE_MISSING_GENERIC,  /**< The (required) group "generic" is missing */
        CFILE_KEY_MISSING,      /**< A (required) key is missing */
        CFILE_VALUE_INVALID,    /**< A value is syntactically invalid */
        CFILE_MISSING_GENERIC,  /**< The (required) group "generic" is missing */
        CFILE_KEY_MISSING,      /**< A (required) key is missing */
        CFILE_VALUE_INVALID,    /**< A value is syntactically invalid */
+       CFILE_VALUE_UNSUPPORTED,/**< A value is not supported in this build */
        CFILE_PROGERR           /**< Programmer error */
 } CFILE_ERRORS;
 
        CFILE_PROGERR           /**< Programmer error */
 } CFILE_ERRORS;