From owner-freebsd-bugs@FreeBSD.ORG Tue Jul 1 18:20:01 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E64A1065671 for ; Tue, 1 Jul 2008 18:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 54AF68FC14 for ; Tue, 1 Jul 2008 18:20:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m61IK1si011435 for ; Tue, 1 Jul 2008 18:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m61IK1XW011434; Tue, 1 Jul 2008 18:20:01 GMT (envelope-from gnats) Resent-Date: Tue, 1 Jul 2008 18:20:01 GMT Resent-Message-Id: <200807011820.m61IK1XW011434@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Mateusz Guzik Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E9341065671 for ; Tue, 1 Jul 2008 18:11:33 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD268FC0C for ; Tue, 1 Jul 2008 18:11:33 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m61IBWZb022366 for ; Tue, 1 Jul 2008 18:11:32 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.2/8.14.1/Submit) id m61IBWk0022365; Tue, 1 Jul 2008 18:11:32 GMT (envelope-from nobody) Message-Id: <200807011811.m61IBWk0022365@www.freebsd.org> Date: Tue, 1 Jul 2008 18:11:32 GMT From: Mateusz Guzik To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/125154: [patch] mount ignores values returned by exec_mountprog and mount_fs X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2008 18:20:01 -0000 >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: