this prevents sysctl from coredumping if the second call fails while the
first succeeds. This isn't supposed to happen, but there is another bug
in the i386 kernel implementation of sysctl machdep.diskinfo that excites this
At the moment this only affects the display part, hiding console colors,
border color and/or console scrollback if their respective ioctls are
not supported by the running kernel.
Trying to write to these variables will still fail with the correct ioctl
error message.
at the moment.
This includes the addition of two new wsdisplay ioctls, WSDISPLAY_{G,S}BORDER,
one to get the actual color and one to set it, respectively. Possible colors
match those defined by ANSI (and listed in wsdisplayvar.h).
It also adds two accessops to the underlying graphics device, getborder and
setborder, which mach their ioctl counterparts.
Two kernel options are added: WSDISPLAY_CUSTOM_BORDER, which enables the
ioctls described above (to customize the border color from userland after
boot), and WSDISPLAY_BORDER_COLOR, which sets the color at boot time.
The former is enabled by default on the GENERIC kernel, but not on INSTALL
(among others). The later is always commented out, leaving the usual black
border as a default.
wsconsctl is modified to allow accessing this value easily. For example,
'wsconsctl -d -w border=blue'.
Two new ioctls are added to the wsdisplay device, named WSDISPLAY_GMSGATTRS
and WSDISPLAY_SMSGATTRS, used to retrieve the actual values and set them,
respectively (the name, if you are wondering, comes from "message attributes").
A new emulop is added to the underlying display driver (only vga, for now)
which sets the new attribute for the whole screen, without having to clear
it. This is optional, which means that this also works with other drivers
that don't have this new operation.
Five new kernel options have been added, although only documented in
i386 kernels (for now):
- WSDISPLAY_CUSTOM_OUTPUT, which enables the ioctls described above to
change the colors dynamically from userland. This is enabled by default
in the GENERIC kernel (as well as others) but disabled on all INSTALL*
kernels (as this feature is useless there).
- WS_DEFAULT_COLATTR, WS_DEFAULT_MONOATTR, WS_DEFAULT_BG and WS_DEFAULT_FG,
which specify the default colors for the console at boot time. These have
the same meaning as the (already existing) WS_KERNEL_* variables.
wsconsctl is modified to add msg.default.{attrs,bg,fg} and
msg.kernel.{attrs,bg,fg} to the display part, so that colors can be changed
after boot.
Tested on NetBSD/i386 with vga (and vga in mono mode), and on NetBSD/mac68k.
No objections in tech-kern@.
more than 2GB of RAM.
"dumpsize" in the on-disk core header is in pages, but, unfortunately,
c.size in our kcore format is an unsigned 32-bit int, gross.
We sleaze it, using a 64-bit int internally here and handing it to
libkvm as a *signed* 32-bit int. Won't always work, but shouldn't be
broken any worse than it is now, and sometimes work better.
We must fix the kcore format and libkvm.
to automatically bring up interfaces, then we should move that code into
ifconfig(8) and out of the kernel, not cycle the interface up and down. Fixes
PR 9400 -- ifconfig(8) was not working as documented.
If the input to 'disklabel' (non -i) referenced a partition two or more
larger than that permitted by npartitions it would error out with 'bad
partition name' (and the option given to re-edit if -e). If a partition one
larger was used it would be dropped from the disklabel with a warning and the
label written anyway! The (off by one) check for a bad partition name was
against npartitions anyway, rather than MAXPARTITIONS. npartitions was just
read from the disklabel and could have been set to an arbitrary value.
Given 'disklabel -i' sets npartitions automatically, make the normal case
check partition names against MAXPARTITIONS, and if necessary increase
npartitions to the size needed to hold the last partition used.
While here remove two 'write only' uses of a 'part' variable.
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')
Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).
Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.
Fixes PR's: PR#17762 PR#25944
to 30 seconds, per PR 25734. I've seen this problem myself. I think
that scsictl should:
1. accept a timeout flag/parameter to set the timeout to an arbitrary
value other than the default.
2. support a verbose mode that would report the timeout value before
the command is started, and then report how long the command actually
took to complete, though I suppose the latter could also be done
by using time(1).
- Not enabled by default. Needs kernel option FFS_SNAPSHOT.
- Change parameters of ffs_blkfree.
- Let the copy-on-write functions return an error so spec_strategy
may fail if the copy-on-write fails.
- Change genfs_*lock*() to use vp->v_vnlock instead of &vp->v_lock.
- Add flag B_METAONLY to VOP_BALLOC to return indirect block buffer.
- Add a function ffs_checkfreefile needed for snapshot creation.
- Add special handling of snapshot files:
Snapshots may not be opened for writing and the attributes are read-only.
Use the mtime as the time this snapshot was taken.
Deny mtime updates for snapshot files.
- Add function transferlockers to transfer any waiting processes from
one lock to another.
- Add vfsop VFS_SNAPSHOT to take a snapshot and make it accessible through
a vnode.
- Add snapshot support to ls, fsck_ffs and dump.
Welcome to 2.0F.
Approved by: Jason R. Thorpe <thorpej@netbsd.org>
but since I was here...
Correct spelling of "Kerberos." Add RFC references.
Reword some awkward english. Sprinkle mandoc macros throughout.
Add white space to aid readability. Change date.
(MD5 signatures for TCP, as used with BGP). Credit for original
FreeBSD code goes to Bruce M. Simpson, with FreeBSD sponsorship
credited to sentex.net. Shortening of the setsockopt() name
attributed to Vincent Jardin.
This commit is a minimal, working version of the FreeBSD code, as
MFC'ed to FreeBSD-4. It has received minimal testing with a ttcp
modified to set the TCP-MD5 option; BMS's additions to tcpdump-current
(tcpdump -M) confirm that the MD5 signatures are correct. Committed
as-is for further testing between a NetBSD BGP speaker (e.g., quagga)
and industry-standard BGP speakers (e.g., Cisco, Juniper).
NOTE: This version has two potential flaws. First, I do see any code
that verifies recieved TCP-MD5 signatures. Second, the TCP-MD5
options are internally padded and assumed to be 32-bit aligned. A more
space-efficient scheme is to pack all TCP options densely (and
possibly unaligned) into the TCP header ; then do one final padding to
a 4-byte boundary. Pre-existing comments note that accounting for
TCP-option space when we add SACK is yet to be done. For now, I'm
punting on that; we can solve it properly, in a way that will handle
SACK blocks, as a separate exercise.
In case a pullup to NetBSD-2 is requested, this adds sys/netipsec/xform_tcp.c
,and modifies:
sys/net/pfkeyv2.h,v 1.15
sys/netinet/files.netinet,v 1.5
sys/netinet/ip.h,v 1.25
sys/netinet/tcp.h,v 1.15
sys/netinet/tcp_input.c,v 1.200
sys/netinet/tcp_output.c,v 1.109
sys/netinet/tcp_subr.c,v 1.165
sys/netinet/tcp_usrreq.c,v 1.89
sys/netinet/tcp_var.h,v 1.109
sys/netipsec/files.netipsec,v 1.3
sys/netipsec/ipsec.c,v 1.11
sys/netipsec/ipsec.h,v 1.7
sys/netipsec/key.c,v 1.11
share/man/man4/tcp.4,v 1.16
lib/libipsec/pfkey.c,v 1.20
lib/libipsec/pfkey_dump.c,v 1.17
lib/libipsec/policy_token.l,v 1.8
sbin/setkey/parse.y,v 1.14
sbin/setkey/setkey.8,v 1.27
sbin/setkey/token.l,v 1.15
Note that the preceding two revisions to tcp.4 will be
required to cleanly apply this diff.
from values to be assigned when processing a file. Clean up error
reporting (print the name of the file and the line number), and tidy
some numeric conversions. Continue after most "errors" when
processing a -f argument.
Addresses PR bin/25115.
this addresses pr/23924
this includes most of support for creating fslevel 3 compatible filesystems,
although there is currently no command line option to invoke it when
not using apple_ufs
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.
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.
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
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
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.
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.
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.
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.)
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, ...
...
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
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@
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.
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