Commit 9f9e8eb3 by Yuto KAWAMURA(kawamuray) Committed by Stéphane Graber

Change find_fstype_cb to ignore blank lines and comments

/etc/filesystems could be contain blank lines and comments. Change find_fstype_cb() to ignore blank lines and comments which starts with '#'. Signed-off-by: 's avatarYuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 3ba37500
...@@ -447,6 +447,10 @@ static int find_fstype_cb(char* buffer, void *data) ...@@ -447,6 +447,10 @@ static int find_fstype_cb(char* buffer, void *data)
fstype += lxc_char_left_gc(fstype, strlen(fstype)); fstype += lxc_char_left_gc(fstype, strlen(fstype));
fstype[lxc_char_right_gc(fstype, strlen(fstype))] = '\0'; fstype[lxc_char_right_gc(fstype, strlen(fstype))] = '\0';
/* ignore blank line and comment */
if (fstype[0] == '\0' || fstype[0] == '#')
return 0;
DEBUG("trying to mount '%s'->'%s' with fstype '%s'", DEBUG("trying to mount '%s'->'%s' with fstype '%s'",
cbarg->rootfs, cbarg->target, fstype); cbarg->rootfs, cbarg->target, fstype);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment