History log of /freebsd-10-stable/usr.sbin/quot/quot.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 241015 27-Sep-2012 mdf

Fix usr.bin/ and usr.sbin/ build with a 64-bit ino_t.

Original code by: Gleb Kurtsou


# 217769 24-Jan-2011 mckusick

The dump, fsck_ffs, fsdb, fsirand, newfs, makefs, and quot utilities
include sys/time.h instead of time.h. This include is incorrect as
per the manpages for the APIs and the POSIX definitions. This commit
replaces sys/time.h where necessary with time.h.

The commit also includes some minor style(9) header fixup in newfs.

This commit is part of a larger effort by Garrett Cooper started in
//depot/user/gcooper/posix-conformance-work/ -- to make FreeBSD more
POSIX compliant.

Submitted by: Garrett Cooper yanegomi at gmail dot com


# 183018 14-Sep-2008 ed

Make `quot -a' work when we've got slashes in the device name.

A very long time ago we had raw device nodes. quot(8) was supposed to
use these when running `quot -a'. For some reason the code got once
changed to strip the device name until it reaches the last slash. This
is not reliable, because this means /dev/mirror/foo will be stripped to
/dev/foo.

This bug also exists on RELENG_7 and RELENG_6, but I think I'll just
merge them back somewhere after the upcoming releases. There's no rush.

MFC after: 2 months


# 180187 02-Jul-2008 des

Drag this code kicking and screaming into the twenty-first century.


# 162831 30-Sep-2006 maxim

o Check we have a non-NULL pointer to a super block before dereference it.

PR: misc/103822
Submitted by: Dmitry Stefankov
MFC after: 2 weeks


# 156015 25-Feb-2006 dwmalone

The quot command expected all inodes contents to be valid, however
on UFS2 inodes are initialised as they are needed, rather than at
newfs time. When quot encountered these inodes it could produce
crazy results.

Now, on UFS2 filesystems, quot's get_inode function will bzero
unallicated inodes before passing them back to a caller. This is
how UFS2 initialises new inodes, so this should work OK.

Also, while I'm here, make quot exit with an error if it finds
inodes of an unknown type. This should help catch future problems
of this type.

Reviewed by: iedowse
MFC after: 1 week


# 144841 09-Apr-2005 stefanf

Remove unused variables.


# 114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


# 114009 25-Apr-2003 tjr

Repair the UFS2 superblock location consistency check so that it succeeds
on valid superblocks instead of issuing the error "not a BSD filesystem".
fs_sblockloc is a byte offset, not a fragment number. This change makes
quot work properly on UFS2 filesystems, which is important now that UFS2
is the default.


# 108458 30-Dec-2002 mike

Back out rev 1.19; getbsize(3)'s original interface has been restored.


# 105883 24-Oct-2002 gallatin

another int * to size_t * change for getbsize() to make it compile
on LP64 hosts


# 98542 21-Jun-2002 mckusick

This commit adds basic support for the UFS2 filesystem. The UFS2
filesystem expands the inode to 256 bytes to make space for 64-bit
block pointers. It also adds a file-creation time field, an ability
to use jumbo blocks per inode to allow extent like pointer density,
and space for extended attributes (up to twice the filesystem block
size worth of attributes, e.g., on a 16K filesystem, there is space
for 32K of attributes). UFS2 fully supports and runs existing UFS1
filesystems. New filesystems built using newfs can be built in either
UFS1 or UFS2 format using the -O option. In this commit UFS1 is
the default format, so if you want to build UFS2 format filesystems,
you must specify -O 2. This default will be changed to UFS2 when
UFS2 proves itself to be stable. In this commit the boot code for
reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c)
as there is insufficient space in the boot block. Once the size of the
boot block is increased, this code can be defined.

Things to note: the definition of SBSIZE has changed to SBLOCKSIZE.
The header file <ufs/ufs/dinode.h> must be included before
<ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and
ufs_lbn_t.

Still TODO:
Verify that the first level bootstraps work for all the architectures.
Convert the utility ffsinfo to understand UFS2 and test growfs.
Add support for the extended attribute storage. Update soft updates
to ensure integrity of extended attribute storage. Switch the
current extended attribute interfaces to use the extended attribute
storage. Add the extent like functionality (framework is there,
but is currently never used).

Sponsored by: DARPA & NAI Labs.
Reviewed by: Poul-Henning Kamp <phk@freebsd.org>


# 96638 15-May-2002 des

Unbreak Alpha build.


# 96479 12-May-2002 phk

Sigh... Yet a BBSIZE breakage.


# 87554 09-Dec-2001 mikeh

WARNS=2 cleanup.

PR: bin/32567
MFC after: 2 weeks


# 74071 10-Mar-2001 ps

Allow for the last arugment to be the mountpoint of a filesystem,
not just the device.


# 69793 09-Dec-2000 obrien

Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.


# 61106 30-May-2000 msmith

/dev/rXXX -> /dev/XXX


# 53764 27-Nov-1999 charnier

Do not repeat the name of the flag. Change alloc to allocate for better
spelling of printed messages.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 41727 13-Dec-1998 dillon

PR: bin/8624

Fixed intermediate calculation overflow when reporting users with > 2GB of
disk space.


# 32595 17-Jan-1998 bde

Started getting rid of the compatibility cruft for the Lite1 mount()
and the pre-Lite2 vfsconf interfaces.

For quot, just back out revs. 1.1 and 1.2 and change MNT_FFS to
"ufs", so that vfsconf isn't used at all. Revs. 1.1 and 1.2 were
hacks to get around f_fstypename not being in `struct statfs' in
Lite1.


# 30262 10-Oct-1997 charnier

Use err(3). Silent -Wall.


# 28160 13-Aug-1997 jkh

Cast argument to lseek() properly to off_t.
PR: 4246
Obtained from: review of PR and NetBSD sources.


# 22997 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 12038 03-Nov-1995 peter

No need to go back quite _that_ far to the MOUNT_UFS constant when we have
a perfectly good getvfsbyname("ufs").. :-)

Pointed out by: wollman and bde


# 12036 03-Nov-1995 peter

Minor tweaks to get quot to compile on FreeBSD..
Basically back-port the dynamic fsname strings back to static constants.


# 12033 03-Nov-1995 peter

This commit was generated by cvs2svn to compensate for changes in r12032,
which included commits to RCS files with non-trunk default branches.


# 12032 03-Nov-1995 peter

Import NetBSD's quot command, filling the gap in our sources
(We only have the man page...)

Obtained from: NetBSD; Wolfgang Solfrank / TooLs GmbH.