Commit Graph

3529 Commits

Author SHA1 Message Date
mycroft 7f2778f63a Print the raw SMART values always. These are important in a bunch of cases --
e.g. for the load cycle count and power-cycle count.

Also, consistently treat the raw values as unsigned.
2004-03-28 01:23:15 +00:00
christos 7ed7713848 From Vernon Schryver:
Wolfgang Solfrank has explained the problem with router discovery
in `routed` in a way I can understand.

Let's assume that the configured preference of the interface is 5.
This gets converted to 0x80000005 through the use of the UNSIGN_PREF
macro.  Later on, this value gets put into the PREF macro, which
compares it against the interface metric(s) (let's assume those
values to be 0 for now).  Of course the 0x80000005, cast to int,
is much less than 0, so the clamping rule is triggered, which
gives us a value of 1.  This is then converted via SIGN_PREF into
0x80000001 and put into the message.  Certainly, this isn't what
was intended.
2004-03-27 20:50:43 +00:00
snj 2055aee33c Bump date for last. 2004-03-27 19:22:28 +00:00
dsl cab7e82dc1 don'e require FS_FLAGS_UPDATED be set for ffsv2 2004-03-27 13:05:07 +00:00
dsl 83a830e1f1 Don't require ffsv2 fs have FS_FLAGS_UPDATED set 2004-03-27 12:59:18 +00:00
dsl 2f7a90efba Don'r check FS_FLAGS_UPDATED for ffsv2 2004-03-27 12:53:53 +00:00
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