Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Jul 2008 18:11:32 GMT
From:      Mateusz Guzik <mjguzik@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/125154: [patch] mount ignores values returned by exec_mountprog and mount_fs
Message-ID:  <200807011811.m61IBWk0022365@www.freebsd.org>
Resent-Message-ID: <200807011820.m61IK1XW011434@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807011811.m61IBWk0022365>