Commit Graph

3626 Commits

Author SHA1 Message Date
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
itojun dda2494d07 aes-xcbc-mac is now an RFC. bump date. 2003-10-21 07:20:11 +00:00
fvdl 83c93c70ba Don't assign NULL to a char. 2003-10-21 02:38:15 +00:00
fvdl 9c9a4505fe Don't use NULL as a case value. 2003-10-21 02:34:45 +00:00
fvdl 954495b615 Don't initialize an int to NULL. 2003-10-21 02:33:34 +00:00
fvdl 34951ed447 The 3rd argument to swapctl() is an int, don't pass NULL in it. 2003-10-21 02:32:54 +00:00
fvdl efbda96887 Don't compare argc to NULL. 2003-10-21 02:31:43 +00:00
fvdl d9495c6d9a Don't compare an integer to NULL. 2003-10-21 02:31:08 +00:00
fvdl a8930c059a Fix various uses of NULL that should have been 0. 2003-10-21 02:30:03 +00:00
pooka bb95bd5936 Handle partition offset and size as unsigned entities. 2003-10-20 13:20:20 +00:00
pooka 84a1b52c43 Partition size and offset inside the disklabel are unsigned. Print
them as unsigned so that we don't print negative values when we're
halfway through.
2003-10-20 13:10:48 +00:00
dsl e69ce3e4bf Add a -q (quiet) option to print nothing for clean filesystems.
Support in fsck_ffs and stub in fsck_xxx.
Push a few more messages through pwarn() instead of printf() to ensure
disk name is shown.
2003-10-20 12:04:38 +00:00
lukem ddff99b7f4 rework to use the newer _MKMSGCREATE (et al) macros 2003-10-19 04:45:01 +00:00
lukem 8564ba3934 support MAKEVERBOSE and use ${HOST_SH} 2003-10-19 01:23:27 +00:00
lukem 3f580214e5 Support CCDF_NOLABEL. Document what CCDF_UNIFORM actually does. 2003-10-17 05:23:56 +00:00
wiz 33261e069b Slight option ordering change. 2003-10-15 19:58:24 +00:00
dsl 02b24a287f The 'struct partition *pp' is only used to save the block and fragment
sizes (so they can be written back into the disklabel).
Allow pp to be NULL
2003-10-15 13:07:34 +00:00
dbj 28fc00d72a initialize llsize and llsizemult to 0
fixes bug noticed by Christopher SEKIYA on tech-kern@
2003-10-15 00:25:28 +00:00
agc b2b49933f4 Move Matt Green's code from a 4-clause to a 3-clause licence by removing
the advertising clause. Diffs provided in PR 22396 by Joel Baker, the changes
were confirmed to the board by Matt Green.
2003-10-13 14:22:20 +00:00
dyoung abda32ca8b Add 'mode' option to change PHY media for 802.11 devices. Also,
display PHY mode. E.g., run an 802.11a (5GHz, 54Mbps max) access
point:

> ifconfig ath0 nwid my_access_point mode 11a mediaopt hostap
> ifconfig -m ath0
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        nwid my_access_point
        powersave off
        bssid 00:05:5d:84:cc:6e chan 3
        address: 00:05:5d:84:cc:6e
        media: IEEE802.11 autoselect mode 11a hostap
        status: active
        supported IEEE802.11 media:
                media autoselect
                media autoselect mediaopt adhoc
                media autoselect mediaopt hostap
                media autoselect mediaopt monitor
                media autoselect mode 11a
                media autoselect mode 11a mediaopt adhoc
                media autoselect mode 11a mediaopt hostap
                media autoselect mode 11a mediaopt monitor
*snip snip*
2003-10-13 08:27:35 +00:00
wiz e347fde976 Bump date for previous; new sentence, new line; use more macros; fix a typo. 2003-10-12 07:21:57 +00:00
tls e333b0fc0e Add an explanation of the fundamental purpose of the "security level"
mechanism and attempt to explain how to use it effectively.
2003-10-12 04:14:56 +00:00
jdolecek 32d4fce65a add RCS Ids 2003-10-11 09:55:58 +00:00
jdolecek 2ced7f69cb fix DPADD 2003-10-11 09:51:49 +00:00
wiz 5ffe40db93 Sort sections; bump date to commit date; add NetBSD RCS Id; mention
when it appeared in NetBSD in HISTORY section; rename section
"GOTCHAS" to "CAVEATS" since that's our standard name.
2003-10-11 09:12:18 +00:00
lukem 7a699e2bed unconditionally #define DEFAULT_BOOTDIR. should fix non-x86 builds 2003-10-11 04:50:49 +00:00
matt 4669b2abcb Compensate for 64bit (use %p for pointers). 2003-10-10 21:59:09 +00:00
wiz 5a3b01bb60 All single letter options are usually combined; add -V to the others. 2003-10-10 09:03:23 +00:00
wiz e5db3159a8 Sync look of -V description in usage with other option descriptions. 2003-10-10 09:00:24 +00:00
grog 5cfcdccff1 Hook Vinum into build. 2003-10-10 06:10:53 +00:00
grant d2b25aff9c bump date for last 2003-10-10 04:14:00 +00:00
grog c52d09a328 Decribe the V flag. 2003-10-10 03:27:10 +00:00
grog 51b6966ad7 Add -V flag for use with Vinum to indicate that the last character of
the device name should not be interpreted as a partition identifier.
2003-10-10 03:23:28 +00:00
grog d5119a1e37 Initial import of Vinum userland.
Ported by:  Ramsubramanyam <Ramsubramanyam@infosys.com>,
	    Atul Kabra <Atul_Kabra@infosys.com>,
	    Maneesh Jhinger <maneesh_jhinger@infosys.com>

Reviewed by:  lukem
2003-10-10 03:13:12 +00:00
dbj 4d76d724b9 calculate "-s size" values after sectorsize has been fully determined
extend "-s size" argument to allow negative sizes to represent value to
subtract from diskalbel partition size
2003-10-09 16:23:29 +00:00
yamt d59161d069 - don't try to write alt super blocks beyond the end of the partition.
- flush stdout when printing each super block addresses.
2003-10-09 14:28:34 +00:00
itojun 8612aa8b30 use asprintf David Hill 2003-10-08 20:39:07 +00:00
itojun eb48d1d3cb plug memory leak. David Hill 2003-10-08 20:36:25 +00:00
lukem 1c33b4e6a4 Overhaul MBR handling (part 1):
<sys/bootblock.h>:
    *	Added definitions for the Master Boot Record (MBR) used by
	a variety of systems (primarily i386), including the format
	of the BIOS Parameter Block (BPB).
	This information was cribbed from a variety of sources
	including <sys/disklabel_mbr.h> which this is a superset of.

	As part of this, some data structure elements and #defines
	were renamed to be more "namespace friendly" and consistent
	with other bootblocks and MBR documentation.
	Update all uses of the old names to the new names.

<sys/disklabel_mbr.h>:
    *	Deprecated in favor of <sys/bootblock.h> (the latter is more
	"host tool" friendly).

amd64 & i386:
    *	Renamed /usr/mdec/bootxx_dosfs to /usr/mdec/bootxx_msdos, to
	be consistent with the naming convention of the msdosfs tools.

    *	Removed /usr/mdec/bootxx_ufs, as it's equivalent to bootxx_ffsv1
	and it's confusing to have two functionally equivalent bootblocks,
	especially given that "ufs" has multiple meanings (it could be
	a synonym for "ffs", or the group of ffs/lfs/ext2fs file systems).

    *	Rework pbr.S (the first sector of bootxx_*):
	    +	Ensure that BPB (bytes 11..89) and the partition table
		(bytes 446..509) do not contain code.
	    +	Add support for booting from FAT partitions if BOOT_FROM_FAT
		is defined.  (Only set for bootxx_msdos).
	    +	Remove "dummy" partition 3; if people want to installboot(8)
		these to the start of the disk they can use fdisk(8) to
		create a real MBR partition table...
	    +	Compile with TERSE_ERROR so it fits because of the above.
		Whilst this is less user friendly, I feel it's important
		to have a valid partition table and BPB in the MBR/PBR.

    *	Renamed /usr/mdec/biosboot to /usr/mdec/boot, to be consistent
	with other platforms.

    *	Enable SUPPORT_DOSFS in /usr/mdec/boot (stage2), so that
    	we can boot off FAT partitions.

    *	Crank version of /usr/mdec/boot to 3.1, and fix some of the other
	entries in the version file.

installboot(8) (i386):
    *	Read the existing MBR of the filesystem and retain the BIOS
    	Parameter Block (BPB) in bytes 11..89 and the MBR partition
	table in bytes 446..509.  (Previously installboot(8) would
	trash those two sections of the MBR.)

mbrlabel(8):
    *	Use sys/lib/libkern/xlat_mbr_fstype.c instead of homegrown code
	to map the MBR partition type to the NetBSD disklabel type.


Test built "make release" for i386, and new bootblocks verified to work
(even off FAT!).
2003-10-08 04:25:43 +00:00
lukem 04a16dcc66 add some more detail to an error message 2003-10-08 03:56:21 +00:00
lukem f41de51799 be consistent about "MS-DOS" 2003-10-06 12:02:52 +00:00
bouyer 85050e8b77 More licence fixes, pointed out by Thomas Klausner. 2003-10-05 20:54:45 +00:00
bouyer 7b066791c8 Remove references to University of California from my copyright notices. 2003-10-05 17:48:49 +00:00
jdolecek 91b453f2db fix NULL pointer pointer dereference in fileerror() when ino is NULL
problem reported and fix provided in PR kern/23065 by Gary Duzan, only
slightly adjusted to only do the VTOI() when needed
2003-10-05 17:11:23 +00:00
dsl 920dff4b7c If /dev/constty exists, use it instead of /dev/console for single user shell.
I'm not 100% certain it should call login_tty() for anything else.
2003-10-03 13:31:32 +00:00
yamt f271a34ced write out modified directory entries to the correct place. 2003-10-03 12:23:22 +00:00
yamt 6e547a61f9 make this work for big (ie. with indirect blocks) directories
without spurious 'EXTRA ..' errors.
2003-10-03 12:22:15 +00:00
wiz b6c5244ce8 Bump date for previous. 2003-10-02 07:07:48 +00:00
itojun 2c96e1a283 use netmask of /32. as discusssed on tech-userlevel 2003-10-02 06:25:28 +00:00
itojun d3e55680aa correct typo. PR misc/22944 2003-10-02 00:09:06 +00:00
itojun 83ddaf1cbf print prefixlen on -show 2003-10-01 06:24:19 +00:00
dsl 4cb1ff990c Forgot the date.... 2003-09-27 19:07:12 +00:00
dsl 0188e8d8ce Add kern.drivers and kern.root_partition to match recent kern_sysctl.c
Add kern.root_device which was absent.
2003-09-27 18:57:05 +00:00
cb 88823a8138 back out revision 1.3. this should not have been committed yet,
since it breaks backward compatibility.

noticed by recht@
2003-09-25 01:43:12 +00:00
wiz 72b77eb9e9 Add article. 2003-09-23 21:25:20 +00:00
cb 7543b55c56 add a new verification method that prompts for the pkcs#5 pbkdf2
passphrase again and checks the generated key against the original.
2003-09-23 17:24:45 +00:00
wiz bc0e64144c Correct error in previous, noted by Nick Hudson. 2003-09-23 12:14:49 +00:00
wiz 0ba80f40e8 Combine multiple single-letter options. 2003-09-21 15:23:55 +00:00
grant 76036fea3c add -e flag to set the separator to '=' where the default is ' = '.
this allows sysctl output to fed back into itself. inspired by
FreeBSD's sysctl(8).

ok'd by atatat.
2003-09-20 17:02:17 +00:00
itojun 731ae88ecd realloc pedant 2003-09-19 08:35:15 +00:00
itojun 6379e11194 realloc pedant 2003-09-19 08:29:58 +00:00
enami 69fc84d695 Need to write entire sector. 2003-09-17 21:09:18 +00:00
grant 9bf724618c put flags in a list with descriptions. add proper description of -w. 2003-09-17 18:24:47 +00:00
cube 5041ba1a4c Remove a comment that referred to a non-committed part of the patch I
submitted for bin/17613. Ok'd by mrg@.
2003-09-16 09:34:48 +00:00
simonb bb850c0c5e Use HW_USERMEM64 to fetch the amount of memory available. 2003-09-13 10:59:50 +00:00
itojun e1d953a832 support DUMP by sysctl 2003-09-12 07:45:21 +00:00
dsl 58915e2274 If /dev/MAKEDEV is a symlink then preserve the symlink in the mfs /dev.
If /dev/MAKEDEV doesn't exist then try to run /etc/MAKEDEV instead.
Use the (new) '-n inodes' option to mount_mfs and base the size on the number
of inodes and the size of the MAKEDEV script.
2003-09-11 12:51:51 +00:00
dsl 188e64350d Change date on man pages 2003-09-11 12:21:01 +00:00
dsl a83765310a Make mkfs -N work again (was trying to read filesystem).
Correct calculation of number of inodes from density for small filesystems.
Add a '-n inodes' option so that the desired number of inodes can be
explicitly given - init needs this for mfs /dev, -i density is too crude.
2003-09-11 12:19:44 +00:00
dsl 82580bb3ec Try very hard to ensure that the correct superblock will be found by
invalidating a host of other possible superblocks.
2003-09-10 17:25:14 +00:00
itojun 0398a95f59 make it possible to use /kern/ipsec{sp,sa} for dumping policy/SA. it will
workaround the issue with socket buffer size in PF_KEY SADB_DUMP.
2003-09-08 12:34:29 +00:00
agc 76b6c930a4 Make this compile after the recent changes to the kernel. 2003-09-08 09:05:08 +00:00
wiz 0eba47bcd1 Sync usage with man page. 2003-09-08 07:21:59 +00:00
wiz d234eaaab1 Sort options. 2003-09-08 07:21:51 +00:00
wiz da332882ea Add file ... mode to usage. 2003-09-08 07:09:53 +00:00
wiz c557470784 Punctuation nit; bump date for previous. 2003-09-08 07:09:13 +00:00
itojun 8ca90bd4e4 add /kern/ipsecsa and /kern/ipsecsp, which can be inspected by setkey(8).
it allows easier access to ipsecsa/sp.  it works around problem where
setkey -D does not work with large number of ipsec SAs due to socket buffer
size.
2003-09-08 06:51:53 +00:00
itojun 4380703631 make it possible to process files. 2003-09-08 06:18:49 +00:00
wiz 4ae63e1052 Bump date for previous. 2003-09-08 05:21:58 +00:00
itojun 9effb481fb "tagged" policy is not introduced to netbsd-current yet 2003-09-07 22:21:01 +00:00
itojun 967747c406 committed by mistake 2003-09-07 22:20:05 +00:00
itojun 643b0ddea3 warn that port-number does not work for gateway config. PR kern/22715
add reference.  bump date.
2003-09-07 22:18:58 +00:00
itojun ce112dfc4f add -t option for gmt time offset (normally MS-DOS filesystem has timestamp
in localtime, not GMT).  PR kern/22717
2003-09-07 22:09:11 +00:00
wiz 47190e80b8 Consistently use 'RFC 1234' instead of 'RFC1234' or 'RFC-1234'.
From jmc@openbsd.
2003-09-07 16:22:20 +00:00
wiz d0b01a96aa New sentence, new line; drop trailing whitespace. 2003-09-06 20:12:41 +00:00
wiz 51e1730356 Punctuation nits. 2003-09-06 20:11:18 +00:00
wiz 495a82c52c New sentence, new line; improve grammar. 2003-09-06 20:09:26 +00:00
jdolecek 06e5ddbb7e if neither -i nor -n option is specified, use the passed argument
as module ID if it's numeric, and as module name if it's not numeric

this saves some typing which bothered me for some years (one too many today)
2003-09-06 19:55:24 +00:00
martin cf6d36c7b6 Make LCP keepalive behaviour configurable. 2003-09-06 19:35:34 +00:00
jdolecek ade4df3adc implement support for forced LKM load, which makes the kernel skip
the version checks, using new -f flag and LMFORCE ioctl

Hopefully the description in the manpage is discouraging enough so that
nobody would dare even _think_ of using forced loads. A warning
message is written to stderr when this is used, just in case.
2003-09-06 19:23:20 +00:00
itojun f189be338c unifdef HAVE_ARC4RANDOM 2003-09-06 12:56:43 +00:00
itojun e2c411ce3c use arc4random 2003-09-06 12:42:00 +00:00
itojun 3f4f8a9b61 s/0x7fffffff/INT32_MAX/ 2003-09-04 15:31:58 +00:00
itojun bb71295ab0 use arc4random(3). it is at least better than random(3)
XXX masked topmost bit so that values don't go negative, is it the right thing
to do?
2003-09-04 15:30:37 +00:00
dsl 426b102381 fsirand is no longer needed. 2003-09-03 19:38:04 +00:00
dsl e6ca38e5ec Ensure the area between the end of the main superblock and the start of the
first alternate superblock is zerod.
Removes any possibility of any programs using a trully out of date
alternate superblock if a filesystem is remade with a larger block size.
2003-09-03 19:29:12 +00:00
dsl 36aa427d2c Randomise di_igen for the first 2 blocks of inodes for non-UFS2 filesystems.
Randomise di_igen for "/" (and lost+found) for UFS2 filesystems.
Ensure nothing from the lost+found inode leaks into the / inode.
2003-09-03 17:08:58 +00:00
wiz feb417a0db Bump date for last. 2003-09-01 04:43:32 +00:00
mycroft 46743e2182 Add prevent/allow commands. 2003-09-01 04:34:16 +00:00
mycroft 4950c2c904 Add a flushcache command -- I need it for my DVD+RW. 2003-09-01 04:24:55 +00:00
dsl 1ce757782d Define and use PRIdaddr for printing disk block numbers.
Should fix bin/22638 for compilation on amd64.
2003-08-29 16:31:30 +00:00
dsl 0f7fa6b1be Update date for last. 2003-08-21 16:02:32 +00:00
dsl 66117d6353 Remove -c maxblkspercg (leaving -c xxx ignored).
-c used to specify the number of cylinders per group
- but newfs has ignored cylinders for a while.
Changing what -c meant is just asking for trouble!
I might add something to let MINCYL be changed.
2003-08-21 15:47:26 +00:00
dsl 870ae687ac Remove unimplemented -n rotational positions
Remove depracated -c cpg (had been fragments per group in newfs.c, but...)
I might add something to let MINCYL (= 4) be configurable.
2003-08-21 15:43:32 +00:00
dsl cff5fdb06e Rework of code that sorts out number of cylinder groups and inodes:
- allows less than 'one fragment per inode' (useful for mfs /dev)
- limits number of inodes to 2^31 (they are stored in an int32_t)
- errors if the number of cylinder groups is such that the cylinder group
  summary won't fit in the first cylinder group.
- ensures that the last cylinder block contains a valid number of fragments
  and inodes, and is not larger than any earlier ones.
- cylinder groups are now created with almost the same size as each other.
Change posted to tech-kern, and no one objected.
2003-08-21 14:55:03 +00:00
dsl beef08b576 Avoid allocating a data buffer the size of the cylinder group summary.
Write the summary every time it fills a fragment - except for the first
sector which is written last.
2003-08-15 15:24:21 +00:00
dsl 8f0618344d Fix layout of printout of alternate superblock list when > 2^32 sectors, use
80 columns (sysinst uses full width these days).
Use {;} instead of , in a couple of places.
Abort if user tries to make a UFS1 filesytem with > 2^31 fragments.
Abort if the cylinder group summary won't fit into the first cylinder group.
Use pread/pwrite and remove a few redundant casts.
2003-08-15 15:07:16 +00:00
itojun d9be8318c9 avoid FD_SET overrun. from openbsd 2003-08-13 08:51:05 +00:00
wiz c2e074ca4b Bump date for last. 2003-08-12 12:25:15 +00:00
dsl 04dec52c29 Mention and cross reference newfs_lfs and makefs. 2003-08-12 10:29:07 +00:00
dsl b4c1c6117c Stop superblock being written to sector 0 for small filesystems.
Honour the '-s size' command option.
Allow an LFS filesystem to be created in a file.
2003-08-12 08:41:36 +00:00
dsl 26461e4412 Put cylinder number 1023 into the mbr for sectors beyond the CHS limit
(rather than encoding the highest CHS addressable sector).
2003-08-10 10:20:08 +00:00
wiz bf2d0ca599 Mention /etc/sysctl.conf. Bump date. Closes PR 22213. 2003-08-07 10:11:02 +00:00
agc 276d62f603 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:22 +00:00
agc bf07c8719a Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22308, verified by myself.
2003-08-07 10:04:11 +00:00
wiz 7539e84445 Bump date for flushall description. 2003-08-07 09:46:17 +00:00
dsl 9b8239809b Exit child process if we fail to 'cd /dev' or 'execl sh MAKEDEV'.
Don't really want two processes in the rest of init!
2003-08-05 09:31:48 +00:00
dsl 42c39f4f19 Make output fit into 80 columns when a partition doesn't end on a cylinder
boundary.
2003-08-04 17:14:50 +00:00
dsl 2ceab48459 Read correct sector when following extended partition chain.
Require extended partition chain to be through increasing sector numbers
in order to abort loops.
2003-08-04 16:51:56 +00:00
jdolecek f462956915 bump date for last 2003-08-02 11:43:21 +00:00
jdolecek 28dd22899a actually enable MNT_GETARGS support 2003-08-02 11:42:20 +00:00
jdolecek 62e0ed44c8 Allow separate masks for files and directories. Useful e.g. to turn
the execute bit off for files, but keep search permission for directories.
Change contributed in PR kern/21538 by Pavel Arnost, based on some FreeBSD
patches.
Further manpage changes, and backward-compatibility adjustments done by me.

Also fixes PR kern/16778 by Johan Danielsson, and PR kern/3400 by Rick Byers
2003-08-02 11:41:19 +00:00
jdolecek 913ed381f5 g/c all traces of FreeBSD-specific code - it only obfuscated the code without
any real benefit
2003-08-02 10:11:47 +00:00
lukem a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem ebf8a4f11a move ${DEPENDSRCS} target to after .include <bsd.*.mk> 2003-07-29 01:45:33 +00:00
lukem eb51573bd7 Use ${DEPENDSRCS} as a target instead of .depend, now that
<bsd.dep.mk> builds .depend from .dep files.
2003-07-28 15:25:02 +00:00
salo b75abedac4 netbsd.org->NetBSD.org 2003-07-26 19:38:45 +00:00
mrg 5a777a5e59 add another (void *) cast to appease gcc3.3 2003-07-26 15:28:24 +00:00
itojun 182a98314c support new algorithms 2003-07-25 10:06:09 +00:00
itojun c9ecfbe3a4 fix packet loss rate computation 2003-07-25 06:01:44 +00:00
ws ebd1f55e89 Only compare the interesting part of the bootblock with its backup. 2003-07-24 19:25:46 +00:00
itojun e45b6fad8e include des.h, not kerberosIV/des.h 2003-07-23 21:10:36 +00:00
itojun aada1051de support hmac-sha2 2003-07-22 03:38:14 +00:00
itojun 453e29a18a cleanup 2003-07-22 03:37:59 +00:00
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