mount: only use source if not set

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
Hiltjo Posthuma 2014-03-15 21:45:09 +01:00 committed by sin
parent df9e438843
commit 55fa13016c
1 changed files with 3 additions and 2 deletions

View File

@ -135,9 +135,10 @@ main(int argc, char *argv[])
strcmp(me->mnt_fsname, target) == 0 ||
(source && strcmp(me->mnt_dir, source) == 0) ||
(source && strcmp(me->mnt_fsname, source) == 0)) {
if(!source)
if(!source) {
target = me->mnt_dir;
source = me->mnt_fsname;
source = me->mnt_fsname;
}
if(!oflag)
parseopts(me->mnt_opts, &flags, data, datasiz);
if(!types)