From setantae@submonkey.net  Tue Dec  4 06:51:53 2001
Return-Path: <setantae@submonkey.net>
Received: from relay3-gui.server.ntli.net (relay3-gui.server.ntli.net [194.168.4.200])
	by hub.freebsd.org (Postfix) with ESMTP id C38A937B405
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  4 Dec 2001 06:51:52 -0800 (PST)
Received: from pc3-card4-0-cust122.cdf.cable.ntl.com
	([62.254.251.122] helo=rhadamanth.private.submonkey.net ident=exim)
	by relay3-gui.server.ntli.net with esmtp (Exim 3.03 #2)
	id 16BGvG-0007dO-00
	for FreeBSD-gnats-submit@freebsd.org; Tue, 04 Dec 2001 14:51:50 +0000
Received: from setantae by rhadamanth.private.submonkey.net with local (Exim 3.33 #1)
	id 16BGvD-000AO2-00
	for FreeBSD-gnats-submit@freebsd.org; Tue, 04 Dec 2001 14:51:47 +0000
Message-Id: <E16BGvD-000AO2-00@rhadamanth.private.submonkey.net>
Date: Tue, 04 Dec 2001 14:51:47 +0000
From: Ceri <setantae@submonkey.net>
Sender: Ceri <setantae@submonkey.net>
Reply-To: Ceri <setantae@submonkey.net>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: quot(8) is stupid regarding the filesystem option
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         32501
>Category:       bin
>Synopsis:       quot(8) is stupid regarding the filesystem option
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    maxim
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 04 07:00:00 PST 2001
>Closed-Date:    
>Last-Modified:  Sat Oct 14 10:32:47 GMT 2006
>Originator:     Ceri
>Release:        FreeBSD 4.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD rhadamanth.private.submonkey.net 4.4-STABLE FreeBSD 4.4-STABLE #0: Mon Nov 26 13:11:22 GMT 2001 setantae@rhadamanth.private.submonkey.net:/usr/obj/usr/src/sys/RHADAMANTH i386


	
>Description:

quot(8) is used to provide details on a filesystem's usage by user.
It takes as the filesystem option either a device or a mountpoint.
It exits with uninformative errors though if the mountpoint contains a
trailing slash, which it usually will do if you are using bash.

The error gives no clue what you have done wrong.

>How-To-Repeat:

In the following :

/data is a mountpoint for a FAT32 filesystem (this works ok)
/tmp is a mountpoint for an MFS filesystem (gives daft error with slash)
/usr is a mountpoint for a UFS filesystem (also gives daft error).

rhadamanth# quot /data
quot: /dev/ad6s5: not a BSD filesystem
rhadamanth# quot /data/
quot: /data/: not a BSD filesystem
rhadamanth# quot /tmp
quot: /dev/ad4s2b: not a BSD filesystem
rhadamanth# quot /tmp/
quot: /tmp/: Undefined error: 0
rhadamanth# quot /usr
/dev/ad4s2g:
1244291	root    
 8629	setantae
 1096	man     
   38	uucp    
    1	www     
rhadamanth# quot /usr/
quot: /usr/: Undefined error: 0

>Fix:

One of the following suggestions :
1) Strip a trailing slash from the input.
2) Refuse to take anything other than a device.
3) Add this to the bugs section of the manpage.

Ceri
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->trhodes 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Tue May 25 10:26:51 PDT 2004 
Responsible-Changed-Why:  
Take this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32501 
Responsible-Changed-From-To: trhodes->maxim 
Responsible-Changed-By: trhodes 
Responsible-Changed-When: Sat Oct 14 10:31:57 UTC 2006 
Responsible-Changed-Why:  
Maxim rules, does my work for me.  Play hot potato and give Maxim 
this PR because he's great.  ;) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=32501 
>Unformatted:
