Commit Graph

4102 Commits

Author SHA1 Message Date
xtraeme
52f9067be9 Remove an extra conditional while searching for LFS superblocks,
it's not needed.
2005-09-02 17:48:40 +00:00
dyoung
fab0410101 If ioctl(,WDOGIOC_SMODE,) fails, kill the child process before
killing self, instead of the other way around.

Fixes a bug where the child process would use 100% CPU spinning
while it waited for its parent to arm a non-existent watchdog timer.
Now, the child process gets killed, as was intended.
2005-08-31 18:28:58 +00:00
dyoung
1c952b1b24 Cosmetic: KNF. 2005-08-31 18:21:39 +00:00
ginsbach
031f929a6c Add full IPv6 syntax support when route is built with -DSMALL and -DINET6.
Fixes PR/23937.  Adapted from supplied patch.
2005-08-31 02:58:30 +00:00
ginsbach
ba49deed2a Clean up some minor nits:
+ style (KNF).
  . don't cast NULL
  . white space clean up
+ use consistent format for error messages.
+ plug memory leaks and avoid malloc(0).
+ verbose message should display even when routing table is empty
  (flushroutes).
2005-08-30 19:01:25 +00:00
rpaulo
a49638942e net.inet?.*.stats are viewable with netstat(1). 2005-08-28 16:18:04 +00:00
uwe
066571f357 Oops, brain fart. PRIu32 should be "u", not "d". 2005-08-27 23:34:52 +00:00
uwe
25503c6713 When building as host tool don't include "../../include/util.h".
opendisk() declared in that file is not used in this case anyway, and
<util.h> pulls in unwatned includes (e.g. <utmpx.h> doesn't exist on
FreeBSD 4.*).
2005-08-27 22:43:40 +00:00
uwe
d42d0f4fb3 Define PRIu32 in host environments that don't have it defined.
Define it to "d", as we are unlikely to support hosts where int is
smaller than 32 bits anyway :).
2005-08-27 22:38:02 +00:00
uwe
a71ee33abc When building as host tool don't include "../../include/util.h".
getlabel{offset,sector} and opendisk functions declared in that file
are not used in this case anyway, and <util.h> pulls in unwatned
includes (e.g. <utmpx.h> doesn't exist on FreeBSD 4.*).

XXX: We can probably undo the #if !HAVE_NBTOOL_CONFIG_H kludge in
<util.h> now.
2005-08-27 22:21:14 +00:00
christos
8a2ba8f0f7 This should be LFS_MAXNAMLEN 2005-08-23 11:44:25 +00:00
tron
0989a73965 Use FFS_MAXNAMLEN instead of MAXNAMLEN. 2005-08-23 11:26:59 +00:00
tron
1dbccd015b Use FFS_MAXNAMLEN instead of MAXNAMLEN. 2005-08-23 11:10:23 +00:00
yamt
653be60965 even with -F, don't overwrite p_size unless filesystem size is
specified by -s.
2005-08-22 09:19:19 +00:00
kent
2fd38e91a5 fix a compilation problem on LP64 2005-08-20 14:59:20 +00:00
christos
982d8230de use d_fileno instead of d_ino for consistency 2005-08-19 06:44:06 +00:00
christos
c4ee9f6d2e 64 bit inode changes 2005-08-19 02:07:18 +00:00
ginsbach
6e420616a8 Make sure that a netmask socket address value prints appropriately when the
family is unset.  Either the destination or interface address socket address
family value is used.  This change prevents the following sort of output:

RTM_NEWADDR: address being added to iface: len 60, metric 0, flags:<UP>
sockaddrs: <NETMASK,IFA,BRD>
 (0) 00.00.ff.00.00 127.0.0.1 127.0.0.1

With this change the last line becomes:

 255.0.0.0 127.0.0.1 127.0.0.1

Also make sure that when using a generated inet netmask the address family
is set.  With this change a generated netmask will print appropriately
when using the verbose (-v) option.
2005-08-15 19:28:08 +00:00
ginsbach
9992d68aff Make sure the get command always exits non-zero on error. This makes things
like the following work as expected.

#!/bin/sh

if ! route -sn get default >/dev/null 2>&1; then
	echo default gateway not set
	exit 1
fi
echo default gateway set

Handle routing socket write(2) errors when they occur.  This produces
better diagnostics by allowing for handling of the special route errno
values ESRCH, EBUSY, and ENOBUFS even with the quiet (-q) option or
when doing a get command.
2005-08-12 21:23:06 +00:00
ginsbach
9c8def382d Trim the local domain name in routename() for INET6 lookups; similar to
INET lookups.
2005-08-12 16:29:06 +00:00
rpaulo
aaf548920f Explained the '-h' option. 2005-08-11 20:56:57 +00:00
rpaulo
630caafc65 Added a new ifconfig flag, -h, allowing, in conjunction with -v, the display
of interface I/O bytes in human-format.

Reviewed by Christos Zoulas and Jason Thorpe.
2005-08-11 20:56:05 +00:00
he
8974f21b75 Make this build for __GNUC__ <= 2 (i.e. for vax). The cast to
caddr_t removes a const qualifier.  Instead, cast the first element
of the subtraction to "struct sockaddr *" to work around the problem.
2005-08-10 11:48:17 +00:00
ginsbach
08af90d648 Accept protocol flags, i.e. -inet, -inet6, with the show command.
[From OpenBSD via DragonFly BSD]
2005-08-09 21:25:42 +00:00
ginsbach
2cff02da42 Fix the default case in sodump(). Printing the address of the "which"
string isn't really that useful.  Instead print the string and the value
of sa_family.
2005-08-09 20:33:06 +00:00
ginsbach
3997584e62 More style nits (KNF); casts and sizeof's are not followed by a space. 2005-08-09 19:43:24 +00:00
he
488e14a7ad Undefine the 17 macros commonly defined by <ufs/ffs/fs.h> and
<ufs/lfs/lfs.h> before including the second of them, and also after
including the second, to ensure the rest of the code doesn't depend
on their (ambigious) definition.

This fixes a build problem for vax; gcc 2.95.3's preprocessor
apparently doesn't like redefinition of macros.

Discussed with xtraeme.
2005-08-09 12:59:29 +00:00
xtraeme
4ef578d357 * Replace lseek() and read() calls with one single pread()
* Align cpg/sgs correctly.
2005-08-09 01:49:23 +00:00
wiz
f309f02fd0 Bump date for previous; use more markup. 2005-08-07 11:17:31 +00:00
blymn
b7550dc6d4 Add and document some convenience aliases for commonly required option
combinations.
2005-08-06 09:00:20 +00:00
jmmv
68e38c123b Replace a dot with a colon, as a list of items follows it. 2005-08-05 13:32:06 +00:00
rpaulo
92c6f16501 Added net.bpf.peers and net.bpf.stats and bumped the date. 2005-08-04 20:10:24 +00:00
rpaulo
78d05017af Inform the user that net.bpf.stats and net.bpf.peers are viewable with
netstat(1).
2005-08-04 19:44:18 +00:00
elad
42735a8747 Sync with reality.
- Verified Exec -> Veriexec
- pseudo-device is `veriexec'
- veriexec.conf -> signatures, and mention /etc/signatures as the default
  location
- We use veriexec's strict level, not the system securelevel
- Mention the `direct' option
- Mention that the signatures file can have multiple options in a single
  entry, comma-separated
- Mention that both `direct' and `indirect' access modes are implied
  if no access modes are explicitly mention in the options
- Bump date
2005-08-02 18:06:14 +00:00
elad
6e4a854552 Support multiple entry types. Direct, indirect, and file can now be
combined in the signatures file using commas.
2005-08-02 16:14:10 +00:00
christos
b6a232217f Pass lint and get/setprogname. 2005-07-31 20:19:40 +00:00
xtraeme
c99f08c80d typo 2005-07-31 19:40:50 +00:00
xtraeme
016ad35975 Add scan_lfs(8), utility to find LFS partitions on disk, useful
to recover lost disklabels.
2005-07-31 19:26:06 +00:00
wiz
f3ce44eee2 Sort options. Various other fixes. 2005-07-24 21:07:52 +00:00
rpaulo
d49bebea61 Add examples for scroll.fastlines and scroll.slowlines.
Also, bump the man page date.

ok wiz@, hubertf@
2005-07-24 20:54:06 +00:00
ginsbach
89cdec0594 switch is not a function, so add a space; sort switch elements
alphabetically (KNF).
2005-07-20 21:12:40 +00:00
ginsbach
d313757b82 * Exit non-zero error code when flushroute() fails operating on the
routing socket, e.g. running route flush as non-root.

* When quiet (-q) don't append error string to a non-existent
  diagnostic output (stdout).  The error diagnostic is still written
  to stderr.  [from FreeBSD]

* Use warn(3) in place of perror(3).
2005-07-15 21:29:54 +00:00
he
36fc2f101b Add const to a duplicate declaration of sd_state(). 2005-07-05 22:21:38 +00:00
wiz
d0b93cc137 Mark up more paths with .Pa, and
break a line (<=80 chars per line).
2005-07-01 17:07:33 +00:00
snj
23b31bb2ee Use more macros and sort xrefs. 2005-06-30 21:36:34 +00:00
christos
fdfc4891f9 Patch from Jeremy Reed to describe how MFS /dev works. Thanks! 2005-06-30 16:38:06 +00:00
drochner
5597e3b8c5 add some (long long) casts to printf() arguments to avoid
gcc warnings
2005-06-30 12:18:16 +00:00
he
fb84548b30 Allow this to build under -Wcast-qual -Werror by adding const to a few
variables/fields initialized to point to string constants.
2005-06-28 18:14:45 +00:00
christos
cc9c2b575d - constify.
- don't dup extern declarations on each file because they end up being
  inconsistent (yyerror).
2005-06-27 03:07:45 +00:00
christos
acdcf67bb0 constify. 2005-06-27 02:56:20 +00:00