Commit Graph

2419 Commits

Author SHA1 Message Date
lukem
664a532e86 - add -F - manipulate a file system image in a regular file (instead of
a special device).
- implement statistics printing on SIGINFO
2001-08-19 14:59:39 +00:00
lukem
5157971af5 - add -F; indicates "special" is a file system image in a regular file
- reorder "special" validation to after option parsing
- use getopt(3) instead of homegrown code
- add getnum() to parse and validate a number
- clean up man page
- ansi KNF, WARNS=2
2001-08-19 09:39:24 +00:00
itojun
4d4d43e300 snprintf return value audit. from deraadt 2001-08-19 01:27:43 +00:00
itojun
426db19de1 use bind(2) to support -S. snprintf return value audit from deraadt 2001-08-19 01:21:42 +00:00
ad
e3af9d1d6b getopt() returns -1 on error, not EOF. 2001-08-18 17:10:04 +00:00
thorpej
3c9726c276 Descend into brconfig/ 2001-08-17 21:43:55 +00:00
thorpej
7ac7787048 Configuration utility for bridge(4) devices. 2001-08-17 21:42:10 +00:00
lukem
1b81d6353d remove third argument (`int ns') from ffs_sb_swap(), and let ffs_sb_swap()
determine the endianness of the `struct fs *o' superblock from o->fs_magic
and set needswap as necessary, rather than trusting the caller to get
it right.  invariably, almost every caller of ffs_sb_swap() was calling it
with ns set to the wrong value for ns anyway!
ansi KNF ffs_bswap.c declarations whilst here.

this fixes all sorts of problems when trying to use other-endian file systems,
notably the kernel trying to access memory *way* off, possibly corrupting or
panicing, and userland programs SEGVing and/or corrupting things (e.g,
"fsck_ffs -B"  to swap a file system endianness).

whilst the previous rev of ffs_bswap.c (1.10, 2000/12/23) made this problem
worse, i suspect that the problem was always there and previous versions
just happened not to trash things at the wrong time.

FFS_EI should now be a lot more stable.
2001-08-17 02:18:46 +00:00
itojun
733748c930 we have never supported lzs. sync with kame 2001-08-16 06:39:09 +00:00
lukem
84958ed05f - implement -F; treat provided filesystems as images in regular files
- replace "filesystem" with "file system" as appropriate
- grammar fixes
2001-08-15 03:54:53 +00:00
lukem
d6e3055ff1 minor whitespace cleanup 2001-08-15 03:40:50 +00:00
lukem
b1a3e1140e - implement -F, which indicates that files-to-dump is a regular file
containing a file system image (instead of being a single file as
  part of a subtree dump)
- use "file system" instead of "filesystem" or "file-system"
2001-08-14 06:51:36 +00:00
lukem
d5eaa32503 s/filesystem/file system/ 2001-08-14 05:44:44 +00:00
lukem
b00117c331 s/filesystem/file system/dump.h 2001-08-14 05:44:15 +00:00
itojun
f0a37a3a91 sync with latest kame. clarifies hex key and other things. 2001-08-12 09:38:18 +00:00
david
11680bf9c9 Correct style of a comment, and bad else {} scoping from my previous
commit.

Thanks to enami tsugutomo for pointing both out.
2001-08-09 01:25:35 +00:00
david
92d578c744 Cause multiple uses of alias, -alias, and delete to produce an error,
and exit.

Previously, combinations would produce unintended results, such as
deleting the primary IP on an interface, instead of deleting an specified
alias.
2001-08-08 21:22:35 +00:00
david
a84be23c10 Patch to drop setgid tty privs until forking for operator notification 2001-08-08 16:49:54 +00:00
lukem
15af0b9ec7 when zeroing the image, use fstatfs() to find the optimal block size
(falling back to 8KB) instead of 512. should speed things up.
2001-08-08 07:34:53 +00:00
lukem
3f273dbe61 WARNS=2 2001-08-03 02:30:23 +00:00
itojun
fdd3ee1f18 embed scopeid on scoped ipv6 address. sync with kame 2001-07-31 23:27:35 +00:00
lukem
8a6a290e5a revert rev 1.48 for now, until i'm sure the malloc (et al) rename is
safe (since there's two separate mallocs using sbrk(2) in that case)

XXX: local malloc provided for mfs memory store allocation; need to
investigate if system (phk) malloc can be used instead.
2001-07-31 01:31:26 +00:00
lukem
2b2279d9a5 - constify mkfs()'s first arg
- slightly reorder steps in -F image creation
2001-07-30 07:45:08 +00:00
lukem
852833fff1 rename and hide: malloc->Malloc, calloc->Calloc, free->Free. (remove realloc) 2001-07-30 07:13:58 +00:00
lukem
84fb126399 ansi knf, WARNS=2 2001-07-29 11:15:29 +00:00
lukem
1c37a982fa enable WARNS=2 2001-07-29 09:59:12 +00:00
lukem
14929f77ab * add -F option: enable creation of file system in a regular file. a "fake"
disklabel is created as per mfs on "swap".
* add -Z option: pre-zero the -F image file before use. this is necessary if
  the image is to be used with vnd(4) because by default the files created
  with -F have "holes" and vnd doesn't cope with that.
* support 'k', 'm', 'g' suffixes for all options which take numeric arguments.
  provide strsuftoi() which performs the parsing mechanism.
* improve man page description of various options
* replace "filesystem" with "file system"
* when displaying usage for mfs, only list mfs options
* minor KNF and WARNS=2 cleanups
2001-07-29 09:55:22 +00:00
lukem
c67d40dc35 improve message describing MAXCSBUFS overflow 2001-07-27 15:19:33 +00:00
lukem
bc1974136c s/filesystem/file system/ 2001-07-27 06:41:02 +00:00
itojun
153665ad26 show net.inet6.tcp6.* as mirror image of net.inet.tcp. better for future
INET-less kernels.
2001-07-27 04:22:09 +00:00
lukem
8a54ab244e clean up for WARNS=2 by renaming some local variables that shadow globals 2001-07-26 22:59:57 +00:00
wiz
f705e892e5 concatinate -> concatenate 2001-07-26 22:49:09 +00:00
wiz
41df6b74a9 partiton -> partition 2001-07-26 22:47:34 +00:00
lukem
b6172cb606 - check return value of calloc() in mkfs()
- in replacement malloc(), if sbrk(2) returns (void *)-1, convert to NULL
  before returning
- in replacement calloc(), check return value of malloc() before zeroing result
2001-07-26 16:53:39 +00:00
wiz
30b2bf87ed Various typos in comments (neccessary, sceme, choise, ...). 2001-07-26 15:05:07 +00:00
lukem
91d95899b4 remove unnecessary duplicate initialisation of sblock.fs_clean 2001-07-26 03:46:57 +00:00
itojun
a7005bd7d6 do not go over the end of memory region we are supposed to touch,
overrun on "prefixlen" operation.  there's no SEGV possibility.
2001-07-25 17:29:14 +00:00
itojun
d615372573 off-by-one error in -prefixlen arg validation (do not permit 129 on IPv6) 2001-07-20 08:31:55 +00:00
itojun
507c97b62e make prefixlen work on IPv4 too 2001-07-20 08:28:25 +00:00
itojun
99ab700036 correct LMC1000 product name (is SSI/V.35, not T1/E1).
print L2 type (T1/E1) on LMC1200.
2001-07-19 00:28:50 +00:00
itojun
820272cae6 detelct LMC1200 T1/E1 card. from openbsd 2001-07-19 00:19:42 +00:00
wiz
e6b5422235 Fix a typo, and capitalize SCSI in one place. 2001-07-18 23:16:20 +00:00
bouyer
03fd5e671e Add and document a 'detach' command. 2001-07-18 20:36:36 +00:00
mrg
d699caad5a reset uid & gid around calling rmthost(). 2001-07-17 10:56:53 +00:00
bad
4cda42fdd0 The way pmsg_addrs() is used requires that it always prints a newline and
flushes stdout before returning.

Previously the decoded output for a message was stuck in stdio buffers until
the next arrived.
2001-07-16 17:22:07 +00:00
mrg
5c897ed92f display what signal, not "unknown" 2001-07-16 13:30:13 +00:00
thorpej
8f43f0ca06 Fix printf format on LP64. 2001-07-13 21:09:55 +00:00
perseant
4e3fced95b Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default.  Changes for the v2 layout include:

- Segments of non-PO2 size and arbitrary block offset, so these can be
  matched to convenient physical characteristics of the partition (e.g.,
  stripe or track size and offset).

- Address by fragment instead of by disk sector, paving the way for
  non-512-byte-sector devices.  In theory fragments can be as large
  as you like, though in reality they must be smaller than MAXBSIZE in size.

- Use serial number and filesystem identifier to ensure that roll-forward
  doesn't get old data and think it's new.  Roll-forward is enabled for
  v2 filesystems, though not for v1 filesystems by default.

- The inode free list is now a tailq, paving the way for undelete (undelete
  is not yet implemented, but can be without further non-backwards-compatible
  changes to disk structures).

- Inode atime information is kept in the Ifile, instead of on the inode;
  that is, the inode is never written *just* because atime was changed.
  Because of this the inodes remain near the file data on the disk, rather
  than wandering all over as the disk is read repeatedly.  This speeds up
  repeated reads by a small but noticeable amount.

Other changes of note include:

- The ifile written by newfs_lfs can now be of arbitrary length, it is no
  longer restricted to a single indirect block.

- Fixed an old bug where ctime was changed every time a vnode was created.
  I need to look more closely to make sure that the times are only updated
  during write(2) and friends, not after-the-fact during a segment write,
  and certainly not by the cleaner.
2001-07-13 20:30:18 +00:00
lukem
364e3039be * add -G, which lists the configuration of the given raid set in the
same configuration format that -c and -C use.
  this is useful if you're using autoconfig and you've misplaced the
  /etc/raidXXX.conf files
* "filesystem" -> "file system", and other man page cleanups.
2001-07-10 01:30:52 +00:00
thorpej
0614e02cbd Need rtsock.c 2001-07-09 20:04:32 +00:00