]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mount.ceph: allow the user to omit ceph_options
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 8 Oct 2010 17:57:58 +0000 (10:57 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Fri, 8 Oct 2010 18:09:23 +0000 (11:09 -0700)
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/mount/mount.ceph.c

index 3a218c617518c9416d18011c749ea067fc3f02bf..43df0aae416bd3950f13365f6fa87187305b76f1 100755 (executable)
@@ -12,6 +12,7 @@
 #define BUF_SIZE 128
 
 int verboseflag = 0;
+static char *EMPTY_STRING = "";
 
 #include "mtab.c"
 
@@ -182,9 +183,6 @@ static char *parse_options(const char *data, int *filesys_flags)
        char *newdata = 0;
        char secret[1000];
 
-       if (!data)
-               return NULL;
-
        if(verboseflag)
                printf("parsing options: %s\n", data);
 
@@ -298,6 +296,8 @@ static char *parse_options(const char *data, int *filesys_flags)
                data = next_keyword;
        } while (data);
 
+       if (!out)
+               return strdup(EMPTY_STRING);
        return out;
 }
 
@@ -323,7 +323,7 @@ static int parse_arguments(int argc, char **argv,
        *node = argv[2];
 
        // Parse the remaining options
-       *opts = NULL;
+       *opts = EMPTY_STRING;
        for (i = 3; i < argc; ++i) {
                if (!strcmp("-h", argv[i]))
                        return 1;