jrf
ce22377a7e
This is an updated submitted patch originally written by Jim Rees
...
and sent in by Greg Hudson as seen in PR misc/3227. Basically what it
does is adds a flushall option which deletes all but localhost routes.
This is done by andoring in a flag called doall (1 means do all routes
including gateway, 0 means do a regular flush). I have seen some
platforms that do this. I tested it out on ipv4 only, it works as
advertised. Commit was approved by christos@.
2003-07-19 01:36:47 +00:00
dsl
ae60f83e33
Remove old i386 mbr stuff (move to arch/i386/stand/mbr a while ago)
...
mbr.8 moved to src/share/man/man8/man8.i386
2003-07-16 11:11:49 +00:00
dsl
02af72a142
Fix code that detects bios geometry from mbr table.
2003-07-14 09:32:12 +00:00
lukem
a21d1e7a14
xref dkctl(8)
2003-07-13 09:55:34 +00:00
lukem
6a52ab7b0e
also reference disklabel(5)
2003-07-13 09:53:10 +00:00
itojun
6950184129
use bounded string op
2003-07-13 08:23:39 +00:00
itojun
49fbaf537e
use bounded string op (one strcpy remains)
...
VS: ----------------------------------------------------------------------
2003-07-13 08:22:55 +00:00
itojun
0e4dc5229d
use bounded string op
2003-07-13 08:16:15 +00:00
itojun
8883e1fb40
use bounded string op
2003-07-13 08:05:58 +00:00
itojun
b5bc655b98
strlcat
2003-07-13 07:59:24 +00:00
itojun
a9282a99c0
die if asprintf fails to malloc
2003-07-13 07:58:19 +00:00
itojun
09c1e9bc45
use bounded copy (a few unbounded copy remains - need work)
2003-07-13 07:48:01 +00:00
itojun
354140d884
remove obsolete comment
2003-07-13 07:45:27 +00:00
itojun
8ff221767c
asprintf is easier. plug memory leak
2003-07-13 07:44:33 +00:00
itojun
d90a2369ab
use bounded string ops
2003-07-13 07:39:39 +00:00
itojun
658b0219c1
snprintf
2003-07-13 07:38:12 +00:00
itojun
0b04aee3ea
use bouded string ops
2003-07-13 07:37:02 +00:00
atatat
fc035bc8fd
Allow _ in tags
2003-07-12 23:02:59 +00:00
itojun
59b2dcde2e
asprintf() is easier than malloc + sprintf
2003-07-12 16:52:22 +00:00
yamt
884f970fae
in ckinode(), use idesc->id_number instead of dino.di_u.inumber
...
since the latter is invalid for pass2 and vget can return invalid vnode
for inode number 0.
2003-07-12 16:13:38 +00:00
itojun
d99433c2b5
use bounded string ops
2003-07-12 14:48:10 +00:00
itojun
09401b303a
use asprintf, which is easier
2003-07-12 14:46:41 +00:00
itojun
efb986d740
sprintf can return negative
2003-07-12 14:36:07 +00:00
itojun
ca9297afc4
use strlcat/strlcpy
2003-07-12 14:33:55 +00:00
yamt
a7f5ddbf64
in lfs_raw_vget(),
...
- don't leave references into free'ed memory region. (fix SIGBUSes)
- plug a memory leak.
2003-07-12 12:28:23 +00:00
yamt
e01ace1f2e
- don't assume that malloc'ed memory is zero-filled.
...
- LIST_INIT {dirty,clean} block lists.
2003-07-12 11:57:59 +00:00
yamt
1d5f020689
fix a null dereference on stale inode.
2003-07-12 11:49:04 +00:00
yamt
c992c60208
only read superblock (ie. struct dlfs) from disk and
...
initialize rest of struct lfs by hand.
(this shouldn't cause a real problem since if superblock is valid,
LFS_SBPAD-sizeof(struct dlfs) bytes after it is always zero-filled, though)
PR/22123 (Izumi Tsutsui)
2003-07-12 11:47:05 +00:00
yamt
96782bb1fd
don't use uninitialized variables.
...
PR/22123 (Izumi Tsutsui)
2003-07-12 11:41:15 +00:00
dsl
7db2cff2fd
Allow for the netbsd partition being in the extended partition list.
2003-07-07 13:05:46 +00:00
dsl
93e88fd2eb
Only look at each pair of CHS values once when trying to guess geometry.
2003-07-07 11:45:00 +00:00
wiz
f4e5486eb2
Bump date for last, and replace some \*[Lt]/\*[Gt] with .Aq.
2003-07-04 13:32:13 +00:00
wiz
6e047dae78
Bump date for last.
2003-07-04 13:09:58 +00:00
ragge
9e60a88e86
Add somaxkva.
2003-07-03 20:15:28 +00:00
itojun
e97be76fa1
strcat -> strlcat
2003-07-03 03:04:04 +00:00
christos
9dd592469e
Avoid code duplication by factoring out the open/map open/write/unmap functions.
2003-07-01 16:44:48 +00:00
lukem
b96069c077
Always compile in support for attempting to obtain the major device
...
number of the console from sysctl("machdep.console_device"), rather
than making in optional on the (unused) #ifdef DEBUG.
Certain platforms do not have the console at makedev(0,0) (including
many arm32 and some sh3 platforms), so the "mfs MAKEDEV" hack would
have failed on those.
Noted in private discussion with Quentin Barnes.
2003-07-01 15:24:22 +00:00
itojun
5af08a4965
more error traps on malloc failure. accept "-E null".
...
various pedantic checks. from kame
2003-07-01 07:20:12 +00:00
simonb
775170c02f
Line up the cylinder numbers in the printlabel output a bit better.
2003-07-01 05:40:54 +00:00
wiz
52270a7fd9
Add Ns.
2003-06-30 11:49:54 +00:00
wiz
9f3dc3febc
Remove unnecessary space before dot.
2003-06-30 11:48:05 +00:00
wiz
d6967e3b9b
Quote punctuation so it gets marked up.
2003-06-30 10:46:22 +00:00
wiz
217ca657dd
Quote macro candidate.
2003-06-27 23:23:51 +00:00
wiz
6dd6d12d66
Add Ns.
2003-06-27 23:06:50 +00:00
wiz
8a0999a756
Remove superfluous "".
2003-06-27 23:02:16 +00:00
agc
c2a3b5ec84
Add NetBSD RCS Ids.
2003-06-23 11:53:35 +00:00
simonb
7eb2ec40b2
Remove the KERN_DRIVERS case handler (prototype code?).
2003-06-17 03:34:23 +00:00
dsl
f8f6959024
Print hw.cnmagic as escaped hex bytes (unless -n given).
...
Change 'special' to be a numeral not a bit, it isn't ever used as a bit
and I can't see why it should ever be used that way.
2003-06-16 21:52:58 +00:00
christos
dffc5f5133
PR/21860: Robert Elz: ifconfig doesn't allow addr/N notation for INET6
2003-06-11 19:51:31 +00:00
christos
072bca2c13
PR/21856: Robert Elz: Changes to route(8) to allow /n instead of -prefixlen
...
for INET6
2003-06-11 15:45:20 +00:00
dsl
ee0a07c072
Make writes to the in-core label persist after mbrlabel closes the disk.
2003-06-07 10:03:39 +00:00
cjep
100bffb736
Fix typo. Noted by Sean Boudreau on tech-net.
2003-06-06 14:18:40 +00:00
joda
e5986b088f
add missing . before Fl
2003-06-03 12:35:54 +00:00
itojun
627957eb53
permit foo/bar notation, like "route add 10.0.0.0/8 127.0.0.1".
...
originally by provos
2003-06-03 04:41:42 +00:00
thorpej
56962fed64
Avoid a strict-alias warning in gcc 3.3.
2003-05-31 23:42:23 +00:00
itojun
1fc7a4943e
correct bad RFC ref. KAME problem report 480
2003-05-27 02:37:24 +00:00
lukem
9014bdbce6
* Document $RCMD_CMD in environ(7).
...
* Cross-reference rcmd(1), rcmd(3), and environ(7) as appropriate.
Should fix [bin/21670] from Geoff Wing.
2003-05-26 10:18:39 +00:00
lukem
35c2bddeea
If RESCUEDIR is defined, use that as an alternate path to sh and mount_mfs,
...
and prepend RESCUEDIR to the default PATH.
(This replaces my _PATH_ALTSHELL mods from rev 1.52 of init.c)
2003-05-26 09:34:55 +00:00
itojun
eb44a81d7f
permit scoped addr notation in policy string (-P esp/tunnel/foo%scope-bar%scope/use). from francis dupont. sync w/kame
2003-05-22 04:01:49 +00:00
wiz
15e9ee5dc8
Add some missing words (like articles), remove duplicate word; fix some nits. From jmc@openbsd.
2003-05-20 10:18:50 +00:00
itojun
f5878476d9
simplify by strlcpy
2003-05-18 02:11:13 +00:00
itojun
8138cbd1bf
simplify more
2003-05-18 02:07:20 +00:00
itojun
ebf587df1a
simplify by strlcpy/cat
2003-05-18 02:06:28 +00:00
itojun
262bdee727
do not hardcode buffer size
2003-05-17 23:16:47 +00:00
itojun
00868410fd
asprintf is easier
2003-05-17 23:14:42 +00:00
itojun
604ac268ac
use snprintf
2003-05-17 23:10:57 +00:00
itojun
fe09a0efcb
use strlcpy
2003-05-17 23:03:28 +00:00
itojun
9cbeabfe77
strlcpy [a few mistakes found]
2003-05-17 23:02:28 +00:00
itojun
aa5672d8c5
sscanf overrun
2003-05-17 01:02:01 +00:00
lukem
3b7c75cfba
Change -b from skipping POINTTOPOINT|LOOPBACK to skipping ! BROADCAST.
...
Fixes my [bin/21604]
2003-05-17 00:48:13 +00:00
yamt
a1d2fd4ed9
fix a typo that prevents -o wsize=nnn to work.
2003-05-16 15:33:45 +00:00
itojun
68452c0c92
assume presense of getifaddrs(3).
2003-05-15 14:44:57 +00:00
wiz
d43e332f1e
setup -> set up.
2003-05-14 12:11:03 +00:00
dsl
b081987b73
delete a diagnostic printf that was accidentally left in
2003-05-14 11:24:05 +00:00
jmc
c9bb642d58
Fix typo
2003-05-09 23:05:53 +00:00
wiz
8cf282a707
Use .Nm instead of .Xr mknod, and sort options in HISTORY (incl. mdoc and grammar nit fixes).
2003-05-09 09:15:20 +00:00
petrov
552633af59
Fix format string. (no % in PRIx..).
2003-05-08 18:39:09 +00:00
christos
0c737a5345
/sbin/wizd points out that it is CYGWIN not GYGWIN.
2003-05-08 14:47:19 +00:00
christos
96618476db
deal with cygwin's dev_t (John Gordon)
2003-05-08 13:29:39 +00:00
lukem
670700cfd8
2.0, not 1.7
2003-05-08 11:36:28 +00:00
dsl
4f32e6a229
Add -g gid -m mode -u uid so that MAKEDEV can run when chown/chmod are
...
not available.
Add -r and -R to do two (different) sensible things if node exists.
From a discussion with Lukem.
2003-05-08 11:34:19 +00:00
lukem
2ac07ea296
Move major_netbsd(), minor_netbsd(), and makedev_netbsd() from
...
pack_dev.c to pack_dev.h, so that #include-rs of the latter can use them.
2003-05-08 09:38:03 +00:00
fair
baafa0e128
Add some mdoc macros. Add text from PR 13878, modified.
2003-05-07 05:19:44 +00:00
wiz
b6bcb58a8b
Bump date for last.
2003-05-06 08:23:57 +00:00
wiz
c94730c38a
MBR, not mbr.
2003-05-06 07:56:03 +00:00
yamt
93fa2d7018
remove _KERNEL hack.
2003-05-05 13:23:10 +00:00
jmmv
6c34824459
Explicitly close open file descriptor before exiting.
2003-05-04 11:54:59 +00:00
christos
e6cde3e511
print masks and modes in octal.
2003-05-03 15:37:07 +00:00
gmcgarry
534f9a7a52
Document -I option. From Richard Rauch <rauch@math.rice.edu>
...
in PR#11890.
2003-05-02 08:09:35 +00:00
atatat
3685b7582e
Convert to using gettimeofday(2) instead of time(3) to get the current
...
time, and stuff as much precision as possible into as many places as
possible. This includes setting the atime, mtime, and ctime on inode
#2 of a freshly created file system, and the birthtime on a new ffs2
filesystem.
Previously these would all be left at zero, and since the birthtime
only gets set when the inode is allocated (and since inode #2 never
gets recycled), inode #2 would always have a birthtime of the epoch.
2003-05-02 03:26:11 +00:00
dsl
5e53f766f8
Change a couple of .Em to .Ar
2003-05-01 13:36:25 +00:00
wiz
0682f1a427
Replace some raw roff with mdoc.
2003-05-01 13:01:17 +00:00
wiz
0d14e41651
Improve formatting for [/bootmenu], requested by dsl; add some commas.
2003-05-01 12:55:52 +00:00
fvdl
617c9472c7
Fix byteswapping issues in dirindir(); mostly from Enami Tsugutomo.
2003-05-01 11:29:55 +00:00
fvdl
161b371dad
Swap the right disk block in mapdirs() for the UFS1 case. From Enami.
2003-05-01 10:59:20 +00:00
dsl
315515ebe4
a mbr -> an mbr
2003-05-01 10:43:58 +00:00
wiz
c662d486a9
mdoc fix, use \*[Lt]/\*[Gt], sort SEE ALSO, some other nits.
2003-05-01 10:43:14 +00:00
wiz
b3d7fe267b
Drop trailing space.
2003-05-01 09:50:12 +00:00
bjh21
b2fbd85bee
Remove some unused variabled from get_params_to_use() in the !i386 && !amd64
...
case.
2003-05-01 09:23:30 +00:00
dsl
93174a8c33
Update to match new mbr code
2003-05-01 08:40:17 +00:00
dsl
c5bd7c9dfd
i386/amd64 mbr is now built in sys/arch/i386/stand/mbr
2003-04-30 19:50:42 +00:00
dsl
8defedc8ba
Don't descend into mbr_bootsel.
...
i386/and64 mbr code is built in arch i386/stand/mbr
2003-04-30 19:49:01 +00:00
dsl
fa01152676
Rototilled fdisk that supports:
...
- editing of the extended partition list
- user friendly default start/size for new partitions
- partition start/size input in sectors, cylinders or MB
- bootsel menu names configured with paritition bounds
- partition update loop asks used which partition to change
(instead of asking about each partition in turn).
- detection (and erroring) of overlapped partitions.
- automatic installation of correct mbr_xxx code (after prompting user)
2003-04-30 19:47:10 +00:00
dsl
6ac09f276d
Move some definitions from fdisk.c to disklabel_mbr.h so they don't have
...
to be duplicated elsewhere (eg in mbr.S).
Modify fdisk.c so that it builds with the new disklabel.h
2003-04-30 10:29:51 +00:00
wiz
57af6bd854
Remove superfluous +. From FUKAUMI Naoki in PR 21390.
2003-04-29 16:39:00 +00:00
fvdl
043f21d9ea
x86_64 -> amd64
2003-04-26 19:14:17 +00:00
fvdl
0945a6df17
x86_64 -> amd64
2003-04-26 19:02:50 +00:00
jdolecek
eb4e67de4b
don't compile this -static, depend on MKDYNAMICROOT check in ../Makefile.inc
...
for that
2003-04-26 12:46:35 +00:00
bouyer
e43e53604e
Add a findblk command, which list the inode(s) owning the disk sector(s)
...
passed as argument.
2003-04-26 08:42:49 +00:00
ragge
46943c2cf6
Try first to use /dev/ksyms to get kernel symbols, if that fails mutter a
...
bit and fallback to the old way.
2003-04-24 20:18:31 +00:00
fvdl
fe36fefa1a
Oops. The clearinode macro had the UFS2 case reversed, causing it to
...
zero out two inodes in the plain FFS case, since UFS2 dinodes are
twice as big.
2003-04-24 20:08:25 +00:00
wiz
287057db85
Bump date for last.
2003-04-24 12:19:06 +00:00
perry
b23b1bcc57
Document what happens when you don't have any dependency lines in a
...
file, and downgrade "must" to "should" in a couple of places.
Answers a documentation complaint from Jeremy C. Reed in PR misc/21251
2003-04-24 03:15:45 +00:00
jrf
6867af7aad
This addresses PR 17613 when certain methods of adding routes would
...
muck up the routing tables. The patch was submitted by Quentin Garnier
<netbsd@quatriemek.com> and tweaked a little after it was reviewed
by Christos Zoulas <christos@netbsd.org>. Final change/commit approved
by Christos.
2003-04-21 13:42:50 +00:00
itojun
16435cdb98
strcpy/sprintf cleanup. from openbsd
2003-04-21 08:54:42 +00:00
dbj
2e6348f3d8
add a SIGINFO handler progress indicator
2003-04-21 07:58:55 +00:00
christos
336e3096f2
PR/5680: Markus Illenseer: Mounting and using broken mfs results into kernel
...
panic
Fixed by checking two return cases from alloc() that were not checked before.
2003-04-20 19:55:33 +00:00
christos
c1c48aec57
PR/5544: Anders Magnusson: Init segfaults when hupped in single user.
...
- fix so that session_db is not de-referenced when null, and other
possible null pointer dereferences.
- ignore hup and tstp in single user mode.
2003-04-20 17:16:31 +00:00
tls
539a3fbb0a
The sysctl returning the amount of memory in the system returns "int",
...
which is silly. Luckily, it really does return the correct result if
interpreted as an unsigned int. This change lets dump work on 32-bit
systems that have more than 2GB of RAM.
2003-04-19 23:29:12 +00:00
christos
7e60cdc11e
add tcp.ident.
2003-04-19 21:55:48 +00:00
wiz
dab156a456
This command is not normally executed at boot time.
...
Closes PR 21225 by Aidan Kehoe.
2003-04-18 14:53:50 +00:00
thorpej
817eb1cb2e
We need -I., too.
2003-04-17 22:12:50 +00:00
fvdl
9f959f87e7
Call MAKEDEV with "init"
2003-04-17 18:04:47 +00:00
fvdl
38f661d48d
-I. -> -I${.CURDIR}
2003-04-17 10:55:43 +00:00
lukem
85828b646a
clear errno before strto(u)l() if we're going to test it for ERANGE afterwards
2003-04-17 04:01:56 +00:00
wiz
472351e13d
Use
...
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
martin
eb1ff84c33
Until timeval.tv_sec becomes a time_t, we can't pass a pointer to
...
it to ctime(). tv_sec is long, while time_t is int on some archs.
2003-04-16 13:32:58 +00:00
wiz
037dbec1f7
New sentence, new line.
2003-04-16 13:05:01 +00:00
wiz
77c7ae1259
Drop superfluous .Pp; bump date for last.
2003-04-16 13:04:27 +00:00
wiz
1745a4efd2
Combine no-argument options in SYNOPSIS.
2003-04-16 12:55:15 +00:00
wiz
3b71168fc8
Bump date for last.
2003-04-16 11:58:43 +00:00
wiz
843df8bc67
Bump date for last-but-one; remove superfluous .Pp.
2003-04-16 10:09:47 +00:00
dsl
1608697b9e
Fix printf formats and kill unused variable to make it compile
2003-04-16 08:39:56 +00:00
darrenr
8745a98a43
Don't forget to increment the iterator when going around a loop
2003-04-15 19:07:37 +00:00
darrenr
543eb62ec5
Add a note to "retry" option about device requirements.
2003-04-15 18:39:58 +00:00
darrenr
8dac8843a5
Implement (and document!) "dkctl <dev> badsector .." to `manage' the bad
...
sector information in the kernel. Doing this uncovered some shortcomings
that should have been pretty obvious with the code committed prior, addressing
the major kludge with a new struct - disk_bacsecinfo to be passed into
DIOCBSLIST.
2003-04-15 18:27:26 +00:00
itojun
3fbac68bea
use snprintf. there are more...
2003-04-15 08:20:17 +00:00
itojun
64e132e781
array seems too small
2003-04-15 07:37:34 +00:00
itojun
84490858f9
correct questionable use of strncpy().
2003-04-15 07:36:14 +00:00
itojun
781846fcdb
use NI_MAX*. 10 is not enough for port number. sync w/kame
2003-04-15 07:32:06 +00:00
elric
3c7e4881c4
Fix typo. params files are not stored in /dev/cgd/
2003-04-15 06:43:36 +00:00
fvdl
7b402ff9df
If an alternate superblock is used, update the standard one correctly.
2003-04-14 18:50:52 +00:00
itojun
506c5eeb9e
permit -s 0. from Maxim Konovalov
2003-04-14 10:18:37 +00:00
yamt
f5f20840e2
save and restore errno in signal handlers.
2003-04-13 10:22:40 +00:00
christos
a16e9fc559
add checkinterface
2003-04-12 04:32:54 +00:00
perry
765e98ca6e
Document the -v and -z flags.
2003-04-12 01:08:28 +00:00
perry
d229e19ca4
Add an option (-z) like -v except that it clears the input/output
...
stats after printing them.
(Basically this just calls SIOCZIFDATA instead of SIOCGIFDATA).
Submitted by Jean-Edouard BABIN in PR bin/21078
However, he suggested using -c, and cgd (reasonably) noted that -z for
"zero" was probably more reasonable.
I've also changed the code very slightly.
2003-04-12 01:07:43 +00:00
christos
c54d6ca813
PR/1472: David Carrel: Add option to specify the nfs port.
...
This was not done, I added the functionality to be able to parse
port=num in the options. While I was there, I added this for all
the other numeric options: rsize, wsize etc.
2003-04-11 17:39:09 +00:00
enami
e89481b248
Correctly detect a UFS1 file system of non-native endian.
2003-04-11 10:21:40 +00:00
jdolecek
40d3f26f8c
desupport LMRESERV_O, anything relying on it doesn't have chance of working
...
anyway due to numerous kernel structure changes
2003-04-11 07:49:31 +00:00