/* If the mount was successful, and we're maintaining an old-style
* mtab file by hand, add the new entry to it now. */
-mtab:
+ mtab:
if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) {
char *fsname;
FILE *mountTable = setmntent(bb_path_mtab_file, "a+");
int i;
- if (!mountTable)
+ if (!mountTable) {
bb_error_msg("no %s",bb_path_mtab_file);
+ goto ret;
+ }
// Add vfs string flags
free(fsname);
}
}
-
+ ret:
return rc;
}
};
int val = xatoi_u(opteq + 1);
*opteq = '\0';
- switch (compare_string_array(options, opt)) {
+ switch (index_in_str_array(options, opt)) {
case 0: // "rsize"
data.rsize = val;
break;
break;
case 12: // "mounthost"
mounthost = xstrndup(opteq+1,
- strcspn(opteq+1," \t\n\r,"));
+ strcspn(opteq+1," \t\n\r,"));
break;
case 13: // "mountprog"
mountprog = val;
val = 0;
opt += 2;
}
- switch (compare_string_array(options, opt)) {
+ switch (index_in_str_array(options, opt)) {
case 0: // "bg"
bg = val;
break;