diff options
author | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-07-22 12:44:41 +0100 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2013-07-22 12:44:41 +0100 |
commit | a73b2264dfd89d526054e4be9926be9f50cca791 (patch) | |
tree | e13d1ff1ef252570eccbace86458de4a74301856 | |
parent | 806fc566fd4544cfcd3334aa1a992bab0f6d277c (diff) | |
download | system_core-a73b2264dfd89d526054e4be9926be9f50cca791.zip system_core-a73b2264dfd89d526054e4be9926be9f50cca791.tar.gz system_core-a73b2264dfd89d526054e4be9926be9f50cca791.tar.bz2 |
fs_mgr: Don't assume all fstab entries have options
Change-Id: I5f537b09d96efa2758372f9da6d66996c2164ee8
-rw-r--r-- | fs_mgr/fs_mgr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c index 848743c..23682cb 100644 --- a/fs_mgr/fs_mgr.c +++ b/fs_mgr/fs_mgr.c @@ -457,11 +457,13 @@ int fs_mgr_mount_all(char *fstab_file) for (i = 0; fstab[i].blk_dev; i++) { #ifndef HAVE_SELINUX - char *contextpos = strstr(fstab[i].fs_options,",context="); + if (fstab[i].fs_options) { + char *contextpos = strstr(fstab[i].fs_options,",context="); - /* This makes it mandatory that context is the LAST mount option */ - if (contextpos != NULL) { - *contextpos='\0'; + /* This makes it mandatory that context is the LAST mount option */ + if (contextpos != NULL) { + *contextpos='\0'; + } } #endif |