Commit Graph

3926 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
705916c692 Whitespace cleanup. 2003-11-07 16:41:47 +00:00
Dag-Erling Smørgrav
45817aaa9c Add a command-line option to format output for human readability.
Currently, the only effect it has is to print some (but not all) numbers
using thousands separators.
2003-11-07 16:33:45 +00:00
Ken Smith
5324d49a71 - add explanation of what an active file system is
- explain the reason for permitting 32 read errors for a dump

PR:		docs/35602 and docs/35607
Reviewed by:	jhb
Approved by:	blackend (mentor)
2003-11-05 22:17:37 +00:00
Johan Karlsson
8fbf7d0847 Make sure argv[x] exists before using it.
PR:		56696
Reported by:	Igor Truszkowski <igort@intergate.pl>
Submitted by:	maxim@
Approved by:	sos@
MFC after:	2 weeks
2003-11-05 21:56:21 +00:00
Johan Karlsson
8fb7e78565 Make this WARNS=6 clean by:
- declaring 'mode2str' as returning a 'const char *'
 - prototyping all function
 - rename the argument 'version' to 'ver', not to shadow
        the now prototyped function 'version'.

Also mark it as WARNS?= 6 clean to try to keep it clean.

Tested by:	make universe (including amd64)
2003-11-05 19:20:41 +00:00
Hajimu UMEMOTO
cf43a05493 - do hexdump on send. set length field properly
- check for encryption/authentication key together with algorithm.
- warned if a deprecated encryption algorithm (that includes "simple")
  is specified.
- changed the syntax how to define a policy of a ICMPv6 type and/or a
  code, like spdadd ::/0 ::/0 icmp6 134,0 -P out none;
- random cleanup in parser.
- use yyfatal, or return -1 after yyerror.
- deal with strdup() failure.
- permit scope notation in policy string (-P
  esp/tunnel/foo%scope-bar%scope/use)
- simplify /prefix and [port].
- g/c some unused symbols.

Obtained from:	KAME
2003-11-05 09:47:54 +00:00
Scott Long
cc2c948fb5 Add support for multibyte character conversions.
Submitted by: imura@ryu16.org
2003-11-05 06:21:45 +00:00
Tom Rhodes
1476864b52 Use 'const' in the copyright stamp, this is done in other utilities.
Return linker.h to the includes list.

No objection from:	wollman (for the copyright)
2003-11-04 21:04:14 +00:00
Ian Dowse
155ea0634c In mapdirs(), do not use the `dp' inode pointer after searchdir()
has been called, since it points to a shared inode buffer that may
be overwritten. The two cases where `dp' was used incorrectly appear
to have been overlooked when "nodump" inheritance was first added
in revision 1.12.

This is reported to correct propagation of the nodump flag on
directories that are larger than one block in size.

PR:		bin/58912
Submitted by:	Volker Paepcke <vpaepcke@incore.de>
MFC after:	1 week
2003-11-04 14:20:14 +00:00
Ian Dowse
ec3f495c76 Add missing prototype for cread(). 2003-11-04 12:27:18 +00:00
Kirk McKusick
524ee1107f Create a .snap directory mode 770 group operator in the root of
a new filesystem. Dump and fsck will create snapshots in this
directory rather than in the root for two reasons:

1) For terabyte-sized filesystems, the snapshot may require many
   minutes to build. Although the filesystem will not be suspended
   during most of the snapshot build, the snapshot file itself is
   locked during the entire snapshot build period. Thus, if it is
   accessed during the period that it is being built, the process
   trying to access it will block holding its containing directory
   locked. If the snapshot is in the root, the root will lock and
   the system will come to a halt until the snapshot finishes. By
   putting the snapshot in a subdirectory, it is out of the likely
   path of any process traversing through the root and hence much
   less likely to cause a lock race to the root.

2) The dump program is usually run by a non-root user running with
   operator group privilege. Such a user is typically not permitted
   to create files in the root of a filesystem. By having a directory
   in group operator with group write access available, such a user
   will be able to create a snapshot there. Having the dump program
   create its snapshot in a subdirectory below the root will benefit
   from point (1) as well.

Sponsored by:   DARPA & NAI Labs.
2003-11-04 07:34:32 +00:00
Kirk McKusick
d62e006473 Check that the user running mksnap_ffs has permission to create and
remove a snapshot file from the directory in which they have requested
to have it made. If they do not have write permission in the directory
or the directory is sticky and not owned by the user, then they
will not be able to remove the snapshot when they are done with it.
2003-11-04 07:04:01 +00:00
Stefan Eßer
5758d949d5 Set exit code to 1 in case at least one of the input files
could not be opened.
2003-11-02 23:12:08 +00:00
Ruslan Ermilov
3565c6a8e3 Style. 2003-11-02 06:47:39 +00:00
Tom Rhodes
b34553a3ab Revert the first part of my previous change.
Requested by:	wollman
2003-11-01 16:57:19 +00:00
Tom Rhodes
31212c21bf The copywrite is not a 'static char', remove the #ifdefs and move the copywrite up
into the commented out 'copywrite' section.

Include sys/linker.h for kldload(3).
2003-11-01 15:58:06 +00:00
Mike Silbersack
ac8711d28e Fix a few style glitches in the previous commit and make the
tunable error message more brief.

Suggested by:	bde
2003-11-01 07:06:04 +00:00
Brooks Davis
405077fd53 We want the length of the string, not the size of its pointer. 2003-11-01 00:03:20 +00:00
Brooks Davis
cd30ca946d Temporarily disconnect ipfstat, ipnat, and ipftest to unbreak world.
Pointy hat to:	brooks
2003-10-31 18:54:46 +00:00
Brooks Davis
9bf40ede4a Replace the if_name and if_unit members of struct ifnet with new members
if_xname, if_dname, and if_dunit. if_xname is the name of the interface
and if_dname/unit are the driver name and instance.

This change paves the way for interface renaming and enhanced pseudo
device creation and configuration symantics.

Approved By:	re (in principle)
Reviewed By:	njl, imp
Tested On:	i386, amd64, sparc64
Obtained From:	NetBSD (if_xname)
2003-10-31 18:32:15 +00:00
Hartmut Brandt
14ecc3c0f0 Use (char *)NULL to terminate the argument list for execlp().
Without this cast the compiler cannot know that it has to convert the
null pointer constant NULL to a null pointer.
2003-10-30 15:04:37 +00:00
Tom Rhodes
565e3e6567 In check.c:
Avoid shadowing declarations.
Avoid compairing signed and unsigned types.
2003-10-30 09:08:09 +00:00
Tom Rhodes
654c287479 Remove a few unused variables. 2003-10-30 05:43:56 +00:00
Tom Rhodes
201747dffc style(9): sort functions. 2003-10-29 21:23:44 +00:00
Tom Rhodes
91b6ac7c44 Properly prototype C function usage().
Sync usage() with the manual page: s/file/snapshot_name/g.
2003-10-29 21:21:09 +00:00
Ian Dowse
5fff09147f When removing trailing slashes, don't remove the first character
of the name if it is '/'. Also fix a comparison between signed and
unsigned quantities (pointed out by trhodes).
2003-10-29 17:44:36 +00:00
Tom Rhodes
feeac7d216 Bump WARNS level and add a '?' to WARNS=. 2003-10-29 16:10:17 +00:00
Tom Rhodes
ff7e70a9ab Remove redundant declaration of the perror() function, it's provided by stdio.h.
Don't define DKTYPENAMES without using it.
2003-10-29 16:09:17 +00:00
Hartmut Brandt
7672807356 Defer allocation of the actual receive mbuf until the external buffer
is returned from the card to the driver. Add a counter that shows
how many times this allocation has failed. Note, that we could even
further delay the allocation of the mbuf until we know, that we need it
(there are no receive errors and the connection is open). This will be done
in a later commit.

Print the new statistics field in atmconfig.
2003-10-29 13:14:39 +00:00
Peter Wemm
a2141d7a53 Fix some 64 bit warnings. You can't fit a pointer in an int. 2003-10-26 04:47:31 +00:00
Peter Wemm
7e9c84c757 Fix a 64 bit warning. Have set_T_dev_t() take a pointer to a size_t rather
than a pointer to an int, since that is what it really wants anyway.
2003-10-26 04:45:08 +00:00
Peter Wemm
30d38f7b0d Fix gcc warnings. If NAME_MAX is 255, and d_namlen is a uint8_t, then
d_namlen can never be > NAME_MAX.  Stop gcc worrying about this by
using a preprocessor test to see if NAME_MAX changes.
2003-10-26 04:43:02 +00:00
Peter Wemm
7b4ef4ac04 64 bit fixes. in_addr_t is an uint32_t, not a u_long. 2003-10-26 04:37:57 +00:00
Peter Wemm
566214a32a Give wider types to sscanf to fix two warnings (u_short cannot be > 0xffff)
and to make sure that we catch oversized arguments rather than silently
truncate them.  I dont know if sscanf will reject an integer if it will
not fit in the short return variable or not, but this way it should be
detected.
2003-10-26 04:36:47 +00:00
Tom Rhodes
2998b879f0 style.Makefile: Add a '?' before '=' in WARNS. 2003-10-26 00:35:05 +00:00
Warner Losh
842ccec57e Parse the ! lines that will soon be coming from the kernel. These are
a generalized notification mechanism for subsystems wishing to report
events.

Revieded by: njl

# The kernel side seems like it might be causing panics for me, but should
# be forthcoming shortly.
2003-10-24 22:02:29 +00:00
Hajimu UMEMOTO
f95d46333d Switch Advanced Sockets API for IPv6 from RFC2292 to RFC3542
(aka RFC2292bis).  Though I believe this commit doesn't break
backward compatibility againt existing binaries, it breaks
backward compatibility of API.
Now, the applications which use Advanced Sockets API such as
telnet, ping6, mld6query and traceroute6 use RFC3542 API.

Obtained from:	KAME
2003-10-24 18:26:30 +00:00
Tom Rhodes
1c614e098d Fix several old bugs which got worse over time:
o WARNS should be WARNS?= (broke in rev 1.21).
o Includes should be sorted.
o Move "mntopt.h" out of the standard includes section.
o Rewrite usage() to match the manual page and make it < 80 characters.
o Remove extra .El call on line 187.  It is unused and causes mdoc(7) warnings.

Discussed with:	bde
2003-10-23 16:09:20 +00:00
Tom Rhodes
9d9696b8e3 Move prototypes into their function. 2003-10-22 20:58:57 +00:00
Tom Rhodes
b0e30de9d8 Make WARNS=2 build without error. 2003-10-22 20:11:42 +00:00
Tom Rhodes
5c9124b23e Add back the commas ',' in usage to avoid a garbled usage message.
They were erroneously removed in revision 1.27.
2003-10-22 19:50:57 +00:00
Sean Chittenden
c80f12d0af Reduce fstab(5)/mount(8) confusion by changing the man pages to say "ro"
instead of "rdonly".  "rdonly" works for mount(8) and mount_std(8) but
not from /etc/fstab, whereas "ro" works for all mount_*(8) commands.
2003-10-22 18:25:49 +00:00
Hajimu UMEMOTO
d24cb2490d stop use of NI_WITHSCOPEID. it was deprecated.
Obtained from:	KAME
2003-10-21 20:11:47 +00:00
Mike Silbersack
d108e6633b Wrap a long line in the previous commit
Suggested by:	njl
2003-10-21 18:48:49 +00:00
Mike Silbersack
9b4b73b7ba Have sysctl print out a more useful error message when it detects that the
user has attempted to write to a read only, tunable value.
2003-10-21 16:49:30 +00:00
Ian Dowse
d6ad008082 Change the default mode for lost+found from 01777 to 0700. The
original intention of the less restrictive permissions was to allow
users to move or delete recovered files that they own. However, it
is better to not create world-writable directories by default; the
administrator can always pre-create lost+found if different permissions
are desired.

Reviewed by:	mckusick
2003-10-19 21:49:44 +00:00
Poul-Henning Kamp
427823d576 Only automatically create an 'a' partition when there is nothing
but a 'c' partition.
2003-10-18 19:32:35 +00:00
Poul-Henning Kamp
2925fa2283 Make the regression test run also with obj directories. 2003-10-17 19:52:07 +00:00
Hajimu UMEMOTO
2f4c5de968 - style
- rename variable
- use strlcpy
- const'fy

Obtained from:	KAME
2003-10-17 11:43:44 +00:00
Poul-Henning Kamp
b6badb5a54 Insert an overview of the plans here, in case I get run over by a bus. 2003-10-13 20:14:02 +00:00