Commit Graph

3623 Commits

Author SHA1 Message Date
dsl 33599967f2 Don't require ffsv2 suberblocks to have FS_FLAGS_UPDATED set 2004-03-27 12:52:16 +00:00
cgd efddf99c99 Recognize 'from_mount' as the device, which is especially useful when
putting root on NFS.  (From my PR, 20305.)
2004-03-27 06:11:48 +00:00
he 4af725d078 Make this too gcc2-compileable. 2004-03-26 23:55:45 +00:00
atatat 29e15c7932 Move sysctlbyname(), sysctlnametomib(), and sysctlgetmibinfo() from
sysctl(8) into libc, making the minor number jump.  Add prototypes to
sys/sysctl.h, fix sets, modify man pages, etc.  That oughta cover it.
2004-03-25 19:36:26 +00:00
wiz bb06082698 Remove duplicate and superfluous words. 2004-03-24 23:49:13 +00:00
atatat b7dd417f09 Remove #define of __USE_NEW_SYSCTL. I'm not even sure I remember what
I used it for, but we certainly don't need it now.
2004-03-24 20:20:44 +00:00
atatat 2de2c6ed07 This file should have a copyright notice on it. 2004-03-24 20:17:59 +00:00
snj 463ea56ee8 Bump date for last. 2004-03-24 19:11:06 +00:00
atatat 4723bb21ba Bring sysctl man pages up to date (wrt new query interface, the
versioning, and descriptions).
2004-03-24 18:22:30 +00:00
atatat 38c4183b04 Implement sysctl descriptions. Now all that remains is actually to
write them.
2004-03-24 18:11:09 +00:00
atatat c6abd47f96 New node version and layout. This should take care of the netbsd32
emulation problem, formalizes the versioning (should it ever be needed
again), and provides a slot for descriptions.
2004-03-24 17:21:02 +00:00
ws 7f76a970b7 After determining whether the filesystem is byte swapped,
we better return that fact to the caller.
2004-03-24 17:07:12 +00:00
atatat d42aae36c0 The new sysctl query interface returns the same information as the old
one, but you must pass in an empty node that indicates the version
you're using.
2004-03-24 16:34:34 +00:00
atatat 19af35fd0d Tango on sysctl_createv() and flags. The flags have all been renamed,
and sysctl_createv() now uses more arguments.
2004-03-24 15:34:46 +00:00
hannken 7deceea338 Make the computation of estimated blocks work for frag size != 1024. 2004-03-24 12:28:51 +00:00
lukem a5a429b354 Only examine mbr_bootsel* #ifdef BOOTSEL.
Noted on current-users@ by Markus Hennecke.
2004-03-24 02:49:37 +00:00
bouyer 2f853da9b0 Fix disclaimer in my copyright. Pointed out by Thomas Klausner. 2004-03-22 19:46:53 +00:00
lukem 455da8e60b Move mbr_bootsel from offset 404 to offset 400 in struct mbr_sector to
leave 4 bytes for the Windows NT Drive Serial Number (DSN) at 440-443
(as mbr_sector.mbr_dsn).

Ensure that all the MBR & PBR code reserves space for mbr_sector.mbr_dsn.

Leave the bootsel magic number at 444-445 as mbr_sector.mbr_bootsel_magic
(instead of mbr_sector.mbr_bootsel.mbrbs_magic), but use 0xb5e1 (MBR_BS_MAGIC)
instead of 0xaa55 (MBR_MAGIC) to indicate that this change has occurred.

Rework MBR_BS_NEWMBR to mean "mbr_bootsel has moved to 400".

Modify fdisk(8) to automatically relocate the mbr_bootsel from 404 to 400
if mbr_bootsel_magic is the old value (0xaa55), and unset MBR_BS_NEWMBR
to flag that new mbr_bootsel code must be used if updating the MBR.


These changes fixes a problem where Windows 2000 or Windows XP would corrupt
the last 3 bytes + NUL of MBR partition 3's bootsel name if the bootsel name
was 5 characters long, replacing bytes 6-9 with the DSN.
Also, by explicitly reserving the space for the DSN we prevent problems in the
future if non bootsel MBR or PBR code had other information at bytes 440-443.
2004-03-22 07:11:00 +00:00
lukem fcfc427464 Use .Pp instead of .br as appropriate.
(This needs more work)
2004-03-22 05:07:56 +00:00
dsl 05f998d8c6 Dunno why this code is playing 'hunt the superblock', but stop it
finding an ffsv1 sb at 64k.
Also stop it playing with fs that have 'FS_FLAGS_UPDATED' set.
It certainly doesn't act on that falg, and my guess is that it is
playing the pre-ffsv2 fs.
Fixes part of PR kern/24809
2004-03-21 21:02:01 +00:00
dsl 13e2deaa83 When searching for the superblock, don't pick an ffsv1 superblock from the
location where we expect to find an ffsv2 superblock.
It could be the first alternate for a ffsv1 filesystem with 64k blocks.
Fixes part of PR kern/24809
2004-03-21 20:30:38 +00:00
dsl 3d7fa497c5 Don't use 1st alternate superblock at offset 64k for ffsv1.
Fixes part of PR kern/24809
2004-03-21 20:12:16 +00:00
dsl 2dc6ea479c Don't use an ffsv1 superblock from 64k (SBLOCK_UFS2) when looking
for the main filesystem superblock.
64k is the offset of the first alternate if the blocksize if 64k.
Fixes part of PR kern/24809
2004-03-21 20:01:41 +00:00
dsl d332d2a959 When searching for the superblock, check that the fs_sblockloc field
matches the location we read it from to ensure we don't have one of the
alternate superblocks.
Fixes part of PR kern/24809
2004-03-21 19:35:23 +00:00
dsl de51f399c0 When searching for the superblock, check that the fs_sblockloc field
matches the location we read it from to ensure we don't have one of the
alternate superblocks.
Fixes part of PR kern/24809
2004-03-21 19:13:59 +00:00
perseant 5aaab72dd6 change KES license to standard NetBSD license 2004-03-20 22:31:13 +00:00
christos 7570f6e829 Remove my license. 2004-03-20 20:28:44 +00:00
wiz d5ca829d8b Single-letter options do not need a line each; add more
commas; drop trailing whitespace; use Pa where appropriate.
2004-03-20 18:51:06 +00:00
wiz 24be734e2d Nm needs no argument; also, correct wrong Nm usage. 2004-03-20 18:49:33 +00:00
atatat 299501e0d7 A little syntactic sugar 2004-03-20 05:22:41 +00:00
snj 17ed0d0099 Bump date for last. Use Sq for single quotes. Drop trailing space.
New sentence, new line.  Sort xrefs.  Fix a spelling error.
2004-03-19 22:21:36 +00:00
dyoung 863043691e Add flag -F to disklabel. Flag -F indicates that the target of the
disklabel operation is a file, not a disk. With -t disktab and -T
disktype, the user may tell disklabel the "geometry" for the file.
2004-03-19 18:22:31 +00:00
dyoung 6c02382b7e Add flag -F, options -t disktab and -T disktype to fdisk. Flag -F
indicates that the target of the fdisk operation is a file, not a
disk. With -t and -T, the user tells fdisk the geometry for the
file If the default geometry that fdisk will "fake up" for a file
are not satisfactory, the user may tell the geometry to fdisk using
-t disktab -T disktype.
2004-03-19 18:19:17 +00:00
wiz 080a1b9108 Remove superfluous TRUE and FALSE definitions.
Noted by Jeff Ito in PR 24845.
2004-03-19 12:04:37 +00:00
wiz f05120b375 Add Xref to mscdlabel, bump date. 2004-03-18 21:13:19 +00:00
dsl 8b6d0cec38 Speed up mkfs of ffsv1 by writing inodes more than 8k at a time.
Use mmap() instead of malloc() for temporary buffers so that they
can be unmapped for mfs.
2004-03-18 20:35:55 +00:00
dsl 5de712832c Simplify logic for MNT_GETARGS and MNT_UPDATE of mfs filesystems.
Stop core dump caused by broken 'newfs -mfs' (= mount_mfs) hack when
newfs run with no arguments.
2004-03-18 20:32:06 +00:00
wiz edf16149c3 Drop trailing whitespace; new sentence, new line. 2004-03-17 01:40:34 +00:00
dan 064ca2e3d1 Fix a longstanding algorithmic flaw in PKCS#5 key generation.
The existing pkcs5_pbdkf2 keygen method is retained functionally
as-is, for compatibility with existing params files.  The corrected
algorithm, which is now the default for new params file generation, is
called pkcs5_pbkdf2/sha1.

NB. The backwards compatibility for the miscreant keygen method will
be removed at the same time as support for the previous parameters
file syntax. Sometime between now and then, users should update their
params files using -G, which will create a new params file including
an xor value so that the resulting generated key is the same; they
should also

Problem discovery and 2-char algorithm fix by Charles Blundell, messy
compat goop by me, long complicated names by Roland Dowdeswell.

Update manpage accordingly and bump date.
2004-03-17 01:29:13 +00:00
lukem b166f025eb Adjust tstart_volume (volume start time) by the time spent in query(),
similar to the adjustment for tstart_writing made in optr.c rev 1.4.
Should fix PR bin/19711 from matthew green.
2004-03-15 01:06:06 +00:00
wiz 4fdf521f76 It's extension, not extention. From Miod Vallat (miod at online fr). 2004-03-14 20:11:24 +00:00
christos c89e18bcd0 Fix remaining issues:
- use getulong everywhere for proper range checking
	- fix error checking in getulong
2004-03-14 00:39:53 +00:00
dsl f1c67110ff Fix breakage of last commit (disklabel -R just plain didn't work!)
Convert two large nasty #defines into much smaller (still nasty) #defines
that call proper functions.
Fixes PR 24765
2004-03-13 22:04:37 +00:00
dsl 8cc28b4b81 stop umount temporarily modifying what might be argv[n]. 2004-03-12 21:48:32 +00:00
dsl ff49552bb2 KNF and const sprinkle 2004-03-12 21:26:43 +00:00
dsl b47125007b Fix 'umount host:/filesystem' - it is documented on the man page but hasn't actually
worked for 10 years!
Remove the (broken) code that once supported 'umount /filesystem@host' since that
syntax isn't used anywhere.
Fixes PR bin/22099
2004-03-12 21:14:29 +00:00
dsl 4334e6508d Re-instate the old behaviour where 'mount_mfs device mount_pt' would
use the size of 'device' for teh file syste size - fixes pr 18353.
(It might be better to be able to say 50% of the size...)
Fix 'mount_mfs -N ...', as well as supressing the creation of the fs, the -N
inhibits the supression of the prints of the mfs parameters.
2004-03-07 12:26:38 +00:00
dsl 4ad476f16a Make update mounts (to change miniroot ramdisks to rw) take the same short
circuit as MNT_GETARGS.
Fixes PR#24533
2004-03-07 00:17:04 +00:00
wiz eec56f3b12 Bump date for previous. 2004-03-06 23:38:40 +00:00
blymn 03244f56bf Fix error in description of signature file syntax (thanks to Chrisian
Biere)
Fix wording to match changed syntax line
Add some clarifications to the wording
Improve vertical spacing of some sections.
2004-03-06 12:03:48 +00:00
blymn fdcc085558 Removed arbitrary 255 character limit on file field
Verify that the path in the file field is not > MAXPATHLEN, if it is
too long then skip that entry in the signature file.
2004-03-06 11:59:30 +00:00
blymn a65a328d6f Made error messages more descriptive. 2004-03-06 11:57:14 +00:00
itojun 466ceae082 unifdef -DINET6. getaddrinfo will always be there, so there's no point in
keeping old code.  moreover old code does not traverse list of DNS-returned
addresses.
2004-03-01 23:01:18 +00:00
wiz 7725807d73 Add an article. 2004-03-01 00:19:06 +00:00
perry 3900dd63b3 Change "nwid" to "ssid", list "nwid" as a synonym for "ssid", and
clean up the ssid explanation a bit (including mentioning that if you
want to use a hex ssid, you precede it with a 0x, which really needed
documenting.)
2004-03-01 00:16:24 +00:00
perry be009ae585 Very minimal changes to make "ssid" and "nwid" aliases, and make the
ssid print out as "ssid", not "nwid".
XXX Really, someone should go through and change around all the
variable names etc. to ssid, but not today.
2004-03-01 00:11:33 +00:00
wiz 028911b136 Drop trailing whitespace (hi perry! :) ). 2004-02-29 23:51:05 +00:00
perry d7493f9be2 update man page date. (hi wiz!) 2004-02-29 23:32:51 +00:00
perry 688c6af823 document that if you are using a hex wep key, you need to put 0x in
front of it.
2004-02-29 23:32:15 +00:00
perry 2e45f00a18 document "mode" -- taken from FreeBSD 2004-02-29 23:27:28 +00:00
oster 0084f2a5e2 Note in the description of hot-adding components that a component label is
not required for the component.  Thanks to David Maxwell for the
documentation suggestion.
2004-02-29 22:22:35 +00:00
itojun 6c57d297ac use strtoul() instead of atoi(). have proper range check for each fields. 2004-02-29 21:31:14 +00:00
oster eac5920af1 As suggested by Paul Ripke, have raidctl use raw devices by default. 2004-02-29 20:40:29 +00:00
dsl 7d06c8be4a Print everything unsigned - helps a bit for disks with [2^31..2^32) sectors. 2004-02-28 18:19:00 +00:00
itojun 566986e38d check strlcpy error. idea from Ryan McBride 2004-02-27 21:36:17 +00:00
atatat f99654532c Make this:
% sysctl -A kern.cp_time

(and also "sysctl -A" without the kern.cp_time argument) print this:

	kern.cp_time: user = 851648, nice = 683496, sys = 69383, ...
	kern.cp_time.0: user = 85648, nice = 68496, sys = 6983, ...
	...

instead of just:

	kern.cp_time.0: user = 85648, nice = 68496, sys = 6983, ...
	...
2004-02-20 05:27:39 +00:00
lukem 4b7a7b777e veriexec can't be changed at securelevel 1 2004-02-19 13:24:31 +00:00
atatat 589a080332 More better display of kern.cp_time for MP machines. Now we use one
sysctl() call to query for each of three different display modes:

(1) sum across all cpus

	% sysctl kern.cp_time
	kern.cp_time: user = 93240, nice = 1507, sys = 17252, ...

(2) data for just cpu 0

	% sysctl kern.cp_time.0
	kern.cp_time.0: user = 93282, nice = 1507, sys = 17264, ...

(3) each cpu individually up to hw.ncpu

	% sysctl -A kern.cp_time
	kern.cp_time.0: user = 93349, nice = 1507, sys = 17280, ...
	kern.cp_time.1: user = 93403, nice = 1507, sys = 17291, ...
	...
2004-02-19 06:51:11 +00:00
atatat 5e111b3c0a Miscellaneous display bugfixes. 2004-02-19 06:44:18 +00:00
atatat a44f68529b Rename sysctlnametomib() to sysctlgetmibinfo() and add FreeBSD
compatible sysctlnametomib() and sysctlbyname() functions.

These are intended to move to libc real soon now.
2004-02-19 06:40:14 +00:00
atatat 8012158924 Avoid using things that don't smell like they're the right size (the
size should be a multiple of sizeof(struct sysctlnode)), and avoid
leaking memory in the case of things that don't have children.
2004-02-19 03:16:24 +00:00
hannken 912c7e4549 Avoid signal race condition. If a slave gets the SIGUSR2 signal between
the "setjmp" and the "ready = 1" statements the slave will pause forever
and the complet dump hangs.

Fixes PR #24453
2004-02-18 10:45:21 +00:00
wiz e365329be5 Spell length with h after t. Inspired by a commit by brad@openbsd. 2004-02-13 18:02:05 +00:00
kleink 888c4ead28 Update the change from rev. 1.42 to reflect that MAXPATH includes room
for the terminating NUL character.
2004-02-12 21:10:39 +00:00
jdolecek a09b055053 it's not correct to use MAXPATHNAME-sized buffer for link command, as
pointed out by Klaus Klein (original idea was that it should hold at least
the pathname ...); instead, let the ELF and a.out backends allocate memory
for the link command, and get rid of the fixed size buffer altogether
2004-02-11 18:42:37 +00:00
jdolecek b69e6f038b use MAXPATHLEN-sized buffer for module paths
reported and fix provided in bin/24379 by Nicolas Joly
2004-02-10 12:30:22 +00:00
ross 9e754b3749 Don't exit on error from pack_dev.c, but return an error string and
have the caller do cleanup and (potentially) report errors in context.
This is needed because mknod(8) is not the only user of pack_dev.[ch]
2004-01-30 19:06:55 +00:00
itojun 22b15c680d do not disclose endianness/sizeof(long) on probe packet. idea from openbsd 2004-01-26 02:21:30 +00:00
wiz 5b067ce441 Bump date for previous. 2004-01-22 07:31:53 +00:00
jonathan 7fde685464 Document net.bpf.maxbufsize in sysctl(8).
NB: bpf isn't a PF_, so where to list it in sysctl(3)?
2004-01-22 03:50:18 +00:00
heas c3ae7aa4c2 Add text descriptions for wskbd types sun and sun-type5. 2004-01-21 15:39:34 +00:00
dbj ab48f19cba don't calculate fake superblock used for finding alternate superblocks
if the disklabel is missing the cpg parameter.  Also print a warning
if this is skipped because of a missing fsize, frag or cpg disklabel parameter
this fixes a divide by zero error reported by martin@
2004-01-20 15:29:35 +00:00
lukem 1fa0b4f2cc * Enable SAVEBOOTAREA on i386 and amd64 (by merging the Makefile
controls with the section for the other MBR-using platforms that
  already enable this)
* Don't prompt the user to "erase the previous contents of the disk"
  when there's no NetBSD MBR partition; SAVEBOOTAREA is sufficient.

These fixes mean that you can create a disklabel (on an i386/amd64) on a disk
that doesn't have a NetBSD MBR partition without trashing the existing MBR.
The previous behaviour was extremely annoying when working with media such
as FAT-formatted CF cards, and didn't really protect people with such from
accidentally trashing part of sector 1 of such disks, and made it extremely
easy to trash sectors 0..15 of those disks instead.
2004-01-18 22:34:22 +00:00
dsl b2cf925344 Use correct sector number when the netbsd partition is in the extended
partition chain (and not the first extended partition).
2004-01-18 16:25:59 +00:00
dbj 67b7740914 print warning if the user specifies a conversion level greater than implemented 2004-01-17 22:17:07 +00:00
dbj d3ee830d65 terminate preen message from previous with \n 2004-01-15 14:52:04 +00:00
dbj e23f416c6b if the user specifies both -b and -p, then just go ahead and update
the primary superblock.
2004-01-15 14:49:28 +00:00
grant fc6ca7735c uppercase NFS acronym 2004-01-15 03:33:20 +00:00
dbj 6300af6ca7 change the message "COVERTING TO FFSv2 SUPERBLOCK" to
"CONVERT TO NEW SUPERBLOCK LAYOUT" to help avoid confusion
2004-01-12 19:40:24 +00:00
mrg 2a3954efe6 - some KNF (80 cols)
- fix a printf format issue
2004-01-10 14:28:37 +00:00
wiz cf9b70c6d4 Update Dd for previous and fix a case. 2004-01-09 23:42:11 +00:00
dbj 8f3b1a3c98 use %#llx instead of %llx when printing incorrect qfmask or qbmask 2004-01-09 22:23:18 +00:00
dbj 753116e06f do not upgrade superblock or set FS_FLAGS_UPDATED unless -c 4 option
is provided.
add compatibility for filesystems before FFSv2 integration
these patches are from pr port-macppc/23925 and should also
fix problems discussed in pr kern/21404 and pr kern/21283
2004-01-09 19:12:31 +00:00
atatat bc0bdd10f7 Used to say "type=", but now says "size=" since that's what it's
supposed to say.
2004-01-08 03:44:48 +00:00
jmmv 0d52ea4901 Remove extra newline from usage message. 2004-01-05 23:27:16 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
wiz 71839f7f61 Standardize flags display in usage. 2004-01-04 00:13:00 +00:00
wiz d78a474461 Bump date for new -F. Standardise flags display in SYNOPSIS. 2004-01-04 00:12:04 +00:00
lukem cf4d2c7308 Don't build cgdconfig when MKCRYPTO==no.
Fixes [bin/18552].
2004-01-03 23:34:29 +00:00
dbj efbd5db673 add -F option, similar to fsck/newfs/dumpfs
correctly handle negative results from fsck's setup routine
handle uid and gid in FS_42INODEFMT inodes
2004-01-03 19:57:42 +00:00
dbj 1c65fb7cac fix logic for handling symlinks in inodes when isappleufs 2004-01-03 17:56:21 +00:00
dbj 1f5f1d50af when doing both -c 2 and -B, swap the blocks listed in the inode
of symlinks, since the swapping happens before the symlinks
are moved into the inode.
2004-01-03 17:27:35 +00:00
dbj f491995334 fix paste-o in previous commit 2004-01-03 10:25:06 +00:00
dbj f3786e90b7 fix bugs with unsigned comparison ofs fs_maxsymlinklen 2004-01-03 10:11:41 +00:00
dbj 9aad8f72b5 increase size of buffer used for updating symlinks with -c 1
otherwise, the block read will blow the stack
2004-01-03 10:07:02 +00:00
itojun 85d26f975b rtsol: factor out dump.c if -DSMALL (for boot floppy)
use __func__ not __FUNCTION__
use timeradd() and timersub() from sys/time.h

from kame
2004-01-03 01:40:31 +00:00
dbj 23d4eb34b2 add uuid field to apple ufs volume label 2004-01-02 05:08:57 +00:00
wiz a96b21c57d Simplify Oo/Oc to Op, since it has only one simple short argument. 2003-12-31 01:21:49 +00:00
thorpej 683cebe2c8 No longer need to include <dev/ic/wdcreg.h> 2003-12-30 19:30:39 +00:00
thorpej a443960167 Don't need to include atavar.h 2003-12-30 19:12:35 +00:00
atatat fd2ec30242 Update sysctl.8 man page to cover all the new stuff. 2003-12-30 14:17:41 +00:00
jdc 3dcb42ad4b Add missing ' in prompt text.
Pointed out by Allen Briggs.
2003-12-29 21:21:25 +00:00
jdc dbc3f17967 If a partition is adjusted so that it falls off the end of the disk, display
a '+' character (aka the '*').

OK'ed by Christos.
2003-12-29 19:13:19 +00:00
jdc 256b6fecd8 Add the ability to define a partition as starting after another partition.
If chaining is on, display all changed partitions (not just this one).

OK'ed by Christos.
2003-12-29 19:12:29 +00:00
dbj 16c34ed5bc fix minor bug in buf cache statistic collecting 2003-12-29 11:42:09 +00:00
atatat d7035f6c9a Fix spelo 2003-12-29 02:11:03 +00:00
heas 43894fc5ac Check result of malloc().
reviewed by Martin.
2003-12-24 01:39:27 +00:00
jmmv 8ee5d1eca6 Fix typo: numder -> number. From Christian Biere in PR bin/23838. 2003-12-22 10:33:21 +00:00
mrg 61b5ab403f bump date for previous 2003-12-21 02:52:02 +00:00
lha 43ac17e0cf Extend SMART status to print temperature. Add support for printing
selftest log (but no code it start selftest yet).
2003-12-20 20:03:20 +00:00
mrg 9bf440d20b support "-g" and "-m" as well as "-k" and "-h". swapctl & swaplist code
from Martin Weber, adapted for pstat by myself.
2003-12-20 13:31:42 +00:00
mrg 5fd013c40d add a "-h" (humanize_number(3)) option to swapctl(8) and pstat(8), from
Martin Weber in PR#23805.

ps: now we only need someone to do ls(1) :-)
2003-12-20 11:22:25 +00:00
yamt 3223caeba2 remove definitions for ffs, which don't belong here. 2003-12-17 05:08:43 +00:00
drochner 7dcd19bbce If a disktype was specified, use the disktab information
and don't try the disklabel.
Allows to create a filesystem on a floppy again.
(It is arguably another bug that DIOCGDINFO returns nonsense
for floppies.)
2003-12-11 12:11:27 +00:00
dyoung f28870d8ac fix spelling, s/extented/extended/ 2003-12-11 05:11:50 +00:00
matt 3c12447a00 Make building IPv6 support controllable by MKINET6 2003-12-07 21:57:22 +00:00
atatat ea73edd395 sysctlnametomib() is a private function for the moment. 2003-12-04 20:07:59 +00:00
atatat c915b3168c New sysctl(8) binary. Performs auto-discovery and can add/remove
nodes from the tree.  Never needs to be recompiled again.
2003-12-04 19:49:39 +00:00
yamt 020176e538 display more capabilities for "identify" command. 2003-11-30 14:07:49 +00:00
lukem c93539067a Determine the MBR partition type relevant for the resulting partition,
and display that.
2003-11-23 23:16:40 +00:00
lukem 2a42af8c7a Add "DISK" to -S output. 2003-11-21 21:47:42 +00:00
bouyer 6fb817f5dd Commit changes proposed on tech-kern Thu, 6 Nov 2003
- factor out disksubr.c between sun3, sparc and sparc64. Keep the sun3
  groveling code to find a NetBSD disklabel in the first sector (so that it
  can find a label at the old sun3 LABELOFFSET) as a fallback is not
  label at LABELOFFSET, or sun label is present.
- Fix the sun3 LABELOFFSET (was 64, but the kernel wrote the NetBSD label at
  128)
- Make next68k disksubr.c always write a next-compatible disklabel.
- remove #ifdef __sparc__ hack from disklabel(8), and change it to issue
  a DIOCWDINFO after writing the disklabel to the raw partition in the
  -r/-I case (so that the kernel can convert the label if needed).
2003-11-15 17:52:30 +00:00
enami b3f1752123 Initialize an uninitialized variable. 2003-11-14 01:31:24 +00:00
simonb 5e217f5e82 Fix "variable shadows global declaration" warnings. 2003-11-12 06:45:14 +00:00
jonathan 88ba77e705 Make per-protocol network input queue stats visible to userland via
sysctl. Add a protocol-independent sysctl handler to show the per-protocol
"struct ifq' statistics. Add IP(v4) specific call to the handler.
Other protocols can show their per-protocol input statistics by
allocating a sysclt node and calling sysctl_ifq() with their own struct ifq *.

As posted to tech-kern plus improvements/cleanup suggested by Andrew Brown.
2003-11-10 20:03:29 +00:00
fvdl fe6b4c315f Bring back disklabel -B for now, since hp300 installboot isn't ready
for prime time yet.
2003-11-10 09:22:09 +00:00
wiz ee1b406595 Spell address with two d's. Inspired by similar changes in OpenBSD,
originating from Jonathon Gray and forwarded by jmc@openbsd.
2003-11-10 08:51:51 +00:00
dsl 6db70be120 Rip out all the '-B bootblock' support, everything should use installboot(8).
(can only affect arm32, hp300 and vax ports, and doesn't affect sysinst).
2003-11-08 09:25:01 +00:00
fvdl 0be1698412 Fix byteswapping a direntry. From Wolfgang Solfrank. 2003-11-05 22:27:16 +00:00
wiz 8920f41e3e Bump date for previous. 2003-11-02 09:01:47 +00:00
shin 2c415ee56d playstation2 needs MBR support in disklabel(8). 2003-11-02 02:52:58 +00:00
oster f80b4d6ea1 Add a couple little warnings about swapping to RAID 5 sets.
(it currently doesn't work.)
2003-11-02 02:20:26 +00:00
wiz e0d8e46808 KNF: sort includes. 2003-11-01 18:42:00 +00:00
wiz a2307c7caf eg -> e.g., vinum -> Xr vinum 4. 2003-11-01 18:38:59 +00:00
dsl 4302f2798d Use fstat(2) to get the partition size (falling back to the label on old
kernels) so that newfs works on vinum (and similar).
Kill the -V hack for vinum.
Don't bother faking up a label for -F and mfs, nothing is needed from it.
Ignore label if special doesn't match DISKPART(sb.st_rdev);
Simplifly logic for default block/frag sizes.
Update man page to match.
WARNS=3.
2003-11-01 17:43:03 +00:00
lukem d20692fdf5 Under no circumstances try to zap an existing superblock at sector 0.
There's no reasonable situation where there will be one there, except if the
disk had data on it previously for some reason.  It's significantly more
likely (read "the world until UFS2 was merged") that sector 0(..15)
contains really important stuff like boot blocks and disk labels.

Once again, I ask, why wasn't UFS2 implemented as a separate file
system a la lfs & ext2fs ?
It could have shared a chunk of the kernel code (just like those),
and had different userland tools and a different fs_type.
2003-10-29 08:14:13 +00:00
lukem 171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
mycroft 6e508d1dff Remove alpha optimization hack. 2003-10-26 16:30:25 +00:00
lukem f85d2d1c14 Use ${HOST_SH} instead of `sh'.
If necessary, pull in <bsd.sys.mk> to get the definition of HOST_SH;
Makefiles that pull in one of (most of) <bsd.*.mk> will get this anyway.
2003-10-26 07:25:33 +00:00
lukem 130ab7336b Rework how MAKEVERBOSE operates:
*	Don't bother prefixing commands with a line of  ${_MKCMD}\
	and instead rely upon "make -s".  This is less intrusive on
	all the Makefiles than the former.  Idea from David Laight.

    *	Rename the variables use to print messages.  The scheme now is:
	    _MKMSG_FOO		Run  _MKMSG 'foo'
	    _MKTARGET_FOO	Run  _MKMSG_FOO ${.TARGET}
	From discussion with Alistair Crooks.
2003-10-21 10:01:19 +00:00