bin/125154: [patch] mount ignores values returned by exec_mountprog and mount_fs

Mateusz Guzik mjguzik at gmail.com
Tue Jul 1 18:20:01 UTC 2008


>Number:         125154
>Category:       bin
>Synopsis:       [patch] mount ignores values returned by exec_mountprog and mount_fs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 01 18:20:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Mateusz Guzik
>Release:        8.0-CURRENT
>Organization:
>Environment:
FreeBSD eternal 8.0-CURRENT FreeBSD 8.0-CURRENT #10: Tue Jul  1 19:18:19 CEST 2008     f at eternal:/usr/obj/usr/src/sys/ETERNAL  i386

>Description:
mount stores values returned by exec_mountprog and mount_fs in variable ret, but it always returns 0.
>How-To-Repeat:
For example one can try to mount msdosfs, while not having module to support it:

# mount -t msdosfs foo /mnt
mount_msdosfs: foo: : Operation not supported by device
# echo $?
0
>Fix:
Patch is attached.

Patch attached with submission follows:

--- sbin/mount/mount.c.orig	2008-07-01 19:51:05.000000000 +0200
+++ sbin/mount/mount.c	2008-07-01 19:58:21.000000000 +0200
@@ -574,11 +574,11 @@
 			putfsent(&sf);
 		else
 			prmount(&sf);
 	}
 
-	return (0);
+	return (ret);
 }
 
 void
 prmount(struct statfs *sfp)
 {


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list