fix up key value parsing

Change-Id: I05e821cd1215c44be780694644e568676fd67565
This commit is contained in:
Koushik Dutta 2012-01-29 14:02:39 -08:00
parent 10034aabc9
commit e2a66586a3

View File

@ -65,11 +65,11 @@ static int parse_options(char* options, Volume* volume) {
volume->length = strtoll(option+7, NULL, 10);
} else if (strncmp(option, "fstype2=", 8) == 0) {
volume->fs_type2 = volume->fs_type;
volume->fs_type = strdup(option);
volume->fs_type = strdup(option + 8);
} else if (strncmp(option, "fs_options=", 11) == 0) {
volume->fs_options = strdup(option);
volume->fs_options = strdup(option + 11);
} else if (strncmp(option, "fs_options2=", 12) == 0) {
volume->fs_options2 = strdup(option);
volume->fs_options2 = strdup(option + 12);
} else {
LOGE("bad option \"%s\"\n", option);
return -1;