ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 7569fd38058a112d1c96d8d7107acbcceba532c3
parent 5b5cb8447e1316e8a4d2607e8d6fc53bd6d1bb48
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 15 Mar 2014 17:11:55 +0100

mount: match on source rule too if argument is set

Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>

Diffstat:
Mmount.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mount.c b/mount.c @@ -132,7 +132,9 @@ main(int argc, char *argv[]) if((fp = setmntent(files[i], "r"))) { while((me = getmntent(fp))) { if(strcmp(me->mnt_dir, target) == 0 || - strcmp(me->mnt_fsname, target) == 0) { + strcmp(me->mnt_fsname, target) == 0 || + (source && strcmp(me->mnt_dir, source) == 0) || + (source && strcmp(me->mnt_fsname, source) == 0)) { source = me->mnt_fsname; target = me->mnt_dir; if(!oflag)