Commit Graph

49 Commits

Author SHA1 Message Date
mdf
a782f0b8bd Fix usr.bin/ and usr.sbin/ build with a 64-bit ino_t.
Original code by:	Gleb Kurtsou
2012-09-27 23:31:19 +00:00
mckusick
242bd272d9 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
2011-01-24 06:17:05 +00:00
ed
66122aeb32 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
2008-09-14 11:50:19 +00:00
des
34dee8955f Drag this code kicking and screaming into the twenty-first century. 2008-07-02 15:51:59 +00:00
maxim
9e9ac4a6cb 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
2006-09-30 07:34:20 +00:00
dwmalone
7c9e42abb8 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
2006-02-25 23:50:15 +00:00
stefanf
ce3085bbfb Remove unused variables. 2005-04-09 14:59:10 +00:00
ru
c05985f13f Sort sections. 2005-01-18 20:02:45 +00:00
ru
6294018a20 Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
obrien
7293a24a2b Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
tjr
5794ae4863 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.
2003-04-25 10:07:50 +00:00
obrien
a920d12f89 style.Makefile(5) 2003-04-04 17:49:21 +00:00
trhodes
6fe1c30dbc Remove contractions.
Use `Force' in place of `Cause' which sounds better.
2003-02-18 03:34:32 +00:00
mike
8540c7c57c Back out rev 1.19; getbsize(3)'s original interface has been restored. 2002-12-30 18:21:47 +00:00
ru
041d1287e8 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
gallatin
1b6c1cf3e0 another int * to size_t * change for getbsize() to make it compile
on LP64 hosts
2002-10-24 17:43:56 +00:00
ache
d218d8d076 Use POSIX-style sort syntax in example 2002-09-24 20:15:11 +00:00
charnier
d2168fe021 The .Nm utility 2002-07-14 14:47:15 +00:00
mckusick
88d85c15ef 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>
2002-06-21 06:18:05 +00:00
des
1a81f5479f Unbreak Alpha build. 2002-05-15 08:01:31 +00:00
phk
b05dda35e6 Sigh... Yet a BBSIZE breakage. 2002-05-12 21:43:02 +00:00
mikeh
e408e50776 Reorder WARNS line for style.
Pointed out by:	bde
2001-12-10 21:13:36 +00:00
mikeh
234a9fe490 WARNS=2 cleanup.
PR:		bin/32567
MFC after:	2 weeks
2001-12-09 07:51:26 +00:00
ru
0d5f9334cf mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
ru
fc3cfdc00e mdoc(7) police: cosmetics. 2001-07-05 09:44:08 +00:00
schweikh
13b243ec3c Remove ncheck in an example; FreeBSD does not have it.
PR:		10158
Submitted by:	Remy Card <card@ens.uvsq.fr>
MFC after:	2 weeks
2001-06-16 09:05:24 +00:00
ru
afd506414e - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
ru
f10dc9aca1 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
ps
a9b8e8be5d Allow for the last arugment to be the mountpoint of a filesystem,
not just the device.
2001-03-10 12:12:47 +00:00
obrien
c2ee1dcc02 Add `_PATH_DEVZERO'.
Use _PATH_* where where possible.
2000-12-09 09:35:55 +00:00
ru
71e2293ad4 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
msmith
9689622e57 /dev/rXXX -> /dev/XXX 2000-05-31 01:04:22 +00:00
mpp
0e58226b9f Fix various man pages to stop abusing the .Bx macro to generate
the string "FreeBSD".  Use the .Fx macro instead.
2000-01-23 02:10:01 +00:00
charnier
1d8a1bacef Do not repeat the name of the flag. Change alloc to allocate for better
spelling of printed messages.
1999-11-27 17:05:08 +00:00
peter
efabb9ccb1 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
dillon
fd960d48d6 PR: bin/8624
Fixed intermediate calculation overflow when reporting users with > 2GB of
    disk space.
1998-12-13 07:16:05 +00:00
phk
4c734c0e4d .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
bde
96fd17c703 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.
1998-01-17 16:45:03 +00:00
charnier
ad303c08c1 Use err(3). Silent -Wall. 1997-10-10 06:31:07 +00:00
charnier
1754071cd4 environmental -> environment. 1997-09-18 06:55:21 +00:00
jkh
e6cd74c649 Cast argument to lseek() properly to off_t.
PR:		4246
Obtained from:	review of PR and NetBSD sources.
1997-08-13 12:09:48 +00:00
peter
b782f4df30 Revert $FreeBSD$ to $Id$ 1997-02-22 16:15:28 +00:00
jkh
808a36ef65 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.
1997-01-14 07:20:47 +00:00
wosch
0426c0af88 comma typos 1996-12-23 23:09:55 +00:00
mpp
511d4f82b2 Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
peter
c72327866c 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
1995-11-03 17:04:02 +00:00
peter
4d54865df6 Minor tweaks to get quot to compile on FreeBSD..
Basically back-port the dynamic fsname strings back to static constants.
1995-11-03 15:21:04 +00:00
peter
153fe8c3bc Import NetBSD's quot command, filling the gap in our sources
(We only have the man page...)

Obtained from: NetBSD; Wolfgang Solfrank / TooLs GmbH.
1995-11-03 15:06:04 +00:00
rgrimes
4064c975ae BSD 4.4 Lite usr.sbin Sources 1994-05-26 05:23:31 +00:00