mount: mount_it_now() - char *dir is not really needed.
This commit is contained in:
parent
c889d2b786
commit
a52145a927
@ -253,7 +253,7 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
|
|||||||
* mtab file by hand, add the new entry to it now. */
|
* mtab file by hand, add the new entry to it now. */
|
||||||
|
|
||||||
if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) {
|
if (ENABLE_FEATURE_MTAB_SUPPORT && useMtab && !rc && !(vfsflags & MS_REMOUNT)) {
|
||||||
char *dir,*fsname;
|
char *fsname;
|
||||||
FILE *mountTable = setmntent(bb_path_mtab_file, "a+");
|
FILE *mountTable = setmntent(bb_path_mtab_file, "a+");
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -273,7 +273,7 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
|
|||||||
|
|
||||||
// Convert to canonical pathnames as needed
|
// Convert to canonical pathnames as needed
|
||||||
|
|
||||||
mp->mnt_dir = dir = bb_simplify_path(mp->mnt_dir);
|
mp->mnt_dir = bb_simplify_path(mp->mnt_dir);
|
||||||
fsname = 0;
|
fsname = 0;
|
||||||
if (!mp->mnt_type || !*mp->mnt_type) { /* bind mount */
|
if (!mp->mnt_type || !*mp->mnt_type) { /* bind mount */
|
||||||
mp->mnt_fsname = fsname = bb_simplify_path(mp->mnt_fsname);
|
mp->mnt_fsname = fsname = bb_simplify_path(mp->mnt_fsname);
|
||||||
@ -286,7 +286,7 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
|
|||||||
addmntent(mountTable, mp);
|
addmntent(mountTable, mp);
|
||||||
endmntent(mountTable);
|
endmntent(mountTable);
|
||||||
if (ENABLE_FEATURE_CLEAN_UP) {
|
if (ENABLE_FEATURE_CLEAN_UP) {
|
||||||
free(dir);
|
free(mp->mnt_dir);
|
||||||
free(fsname);
|
free(fsname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user