Commit Graph

5866 Commits

Author SHA1 Message Date
christos
6ab6e47220 Accept NAME=label for special so that we can wire down our wedges. 2012-04-07 03:13:32 +00:00
christos
fe1ffb96a2 compile this for everyone, and warns=5 2012-04-06 22:42:50 +00:00
christos
788118e647 support sector sizes > 512. 2012-04-06 20:09:26 +00:00
christos
1b4e5840af don't print 2 lines of info, remove the bogus one. 2012-04-02 21:08:02 +00:00
njoly
5dfcab3622 Note that amd64 defaults to 32k read/write data size, just like i386. 2012-04-02 07:27:43 +00:00
joerg
6d6a95294e Avoid non-literal format string. Raise WARNS to 4 and disable
sign warnings instead.
2012-03-24 08:22:24 +00:00
njoly
af97374da1 Remove unexpected newline between Em macro and text. 2012-03-23 18:28:13 +00:00
wiz
89cc021f65 Bump date for previous. 2012-03-22 21:47:20 +00:00
drochner
364a06bb29 remove KAME IPSEC, replaced by FAST_IPSEC 2012-03-22 20:34:37 +00:00
he
1afead990d Convert from K&R to c89 function definitions. 2012-03-21 16:11:26 +00:00
matt
d8695ce615 Default to WARNS=5 2012-03-21 05:47:53 +00:00
riz
f76fc16550 Remove ${NETBSDSRCDIR}/sys/lib/libkern from .PATH; there are no
source files from there compiled.
2012-03-21 00:35:33 +00:00
matt
cf7ed4c9cc Convert to C89 function definitions 2012-03-20 18:50:30 +00:00
christos
c583007244 PR/43141: Tobias Nygren: Print an error on unknown interfaces. 2012-03-17 02:25:08 +00:00
christos
e101c08658 PR/42179: Christoph Badura: Be a little friendlier about missing args. 2012-03-17 02:13:44 +00:00
njoly
d0e00679ff Use Lk macro when dealing with URLs. While here update or remove some
dead URL links. Another part of PR/29238.
2012-03-15 22:35:02 +00:00
joerg
66dd2755f5 Add __printflike attribution to use vprintf and friends with an argument
as format string.
2012-03-15 02:02:20 +00:00
christos
3ddbe03f5e PR/44961: Jukka Ruohonen: for sysctl's with built-in handlers, return OPNOTSUPP
if we don't have handlers instead of using the handler we have and silently
failing on attempts to write a node that cannot be written.
2012-03-11 23:33:00 +00:00
drochner
da4ea9e87f fix a path 2012-03-09 12:30:28 +00:00
tsutsui
50ccec61ff Stop zero'ing all possible superblock backup leftovers conservatively.
Instead, explicitly zap only possible first backups and FFS superblocks.

Fixes "Extreamly slow newfs_ext2fs on 60Gb USB stick" problem
reported by Aleksey Cheusov on tech-kern@.
2012-03-06 15:39:41 +00:00
wiz
f801d65453 Mention scan_ffs -b.
Based on a patch by Matthew Mondor <mm_lists@pulsar-zone.net> on
tech-userlevel.
Bump date.
2012-03-06 10:30:20 +00:00
jakllsch
68ceb36701 Prevent stack buffer overflow when copying too-large-CDB into request. 2012-02-21 02:22:54 +00:00
jakllsch
1355b3bb87 constify command data argument to scsi_command(). 2012-02-21 02:19:41 +00:00
wiz
ea95a8c187 Sort option descriptions a bit more. 2012-02-19 21:32:02 +00:00
christos
fd6f00f4bf PR/45735: Bug Hunting: The dump(8) manpage, as well as the program's `usage'-line,
needs improvement
2012-02-19 19:49:20 +00:00
perseant
ed08fe6512 Pass t_renamerace and t_rmdirrace tests.
Adapt dholland@'s fix to ufs_rename to fix PR kern/43582.  Address several
other MP locking issues discovered during the course of investigating the
same problem.

Removed extraneous vn_lock() calls on the Ifile, since the Ifile writes
are controlled by the segment lock.

Fix PR kern/45982 by deemphasizing the estimate of how much metadata
will fill the empty space on disk when the disk is nearly empty
(t_renamerace crates a lot of inode blocks on a tiny empty disk).
2012-02-16 02:47:54 +00:00
wiz
155b16958f Fix typo. 2012-02-14 11:05:32 +00:00
wiz
d2b212ea03 Remove unused variables.
From cppcheck via Henning Petersen in PR 46004.
2012-02-13 12:59:56 +00:00
christos
b678a11dc2 Only print errors when -A or required. Fix the error message to match others. 2012-02-12 20:54:07 +00:00
wiz
b3d989a54f Remove duplicate RS_LOCAL. From cppcheck via Henning Petersen in PR 46000. 2012-02-12 13:56:56 +00:00
tsutsui
d42cbdf611 Explicitly zap possible Ext2fs magic leftover to prevent
kernel vfs_mountroot() and bootloaders from mis-recognizing
the newfs(8)'ed file system as still Ext2fs.

The problem is reported and the fix is tested by Frank Wille
on current-users@.  Also approved by releng.
2012-02-07 14:14:45 +00:00
tls
7b0b7dedd9 Entropy-pool implementation move and cleanup.
1) Move core entropy-pool code and source/sink/sample management code
   to sys/kern from sys/dev.

2) Remove use of NRND as test for presence of entropy-pool code throughout
   source tree.

3) Remove use of RND_ENABLED in device drivers as microoptimization to
   avoid expensive operations on disabled entropy sources; make the
   rnd_add calls do this directly so all callers benefit.

4) Fix bug in recent rnd_add_data()/rnd_add_uint32() changes that might
   have lead to slight entropy overestimation for some sources.

5) Add new source types for environmental sensors, power sensors, VM
   system events, and skew between clocks, with a sample implementation
   for each.

ok releng to go in before the branch due to the difficulty of later
pullup (widespread #ifdef removal and moved files).  Tested with release
builds on amd64 and evbarm and live testing on amd64.
2012-02-02 19:42:57 +00:00
perseant
2e80c2a7d9 When creating a very small filesystem, use well-known small segment,
block and fragment sizes by default instead of the ordinary 1M/8k/1k
default for larger filesystems.
2012-02-02 03:50:32 +00:00
perseant
8c0be006bf If invoked with -D and creating an image file, ensure that the image
file is filled to the given size.  This prevents false failures
with "lfs: ifile read: 22" in ATF tests.
2012-02-02 03:49:22 +00:00
nonaka
5295a64fde use FS_UFS[12]_MAGIC_SWAPPED instead of bswap32(FS_UFS[12]_MAGIC). 2012-01-29 00:58:13 +00:00
mbalmer
28c55e99d7 When ifconfig is invoked without any arguments, display the list of
all network interfaces (equivalent to ifconfig -a), instead of displaying
the usage.  (This is consistent with the behaviour on FreeBSD and OpenBSD.)
2012-01-28 15:01:44 +00:00
perseant
76c43fd1cf Use an even smaller segment size when creating a very small filesystem.
This allows the lfs_renamerace_dirs case of the t_renamerace test to
fail correctly, rather than with a bogus "file system full" error as it
has since rev 1.135 of sys/ufs/lfs/lfs.h.
2012-01-17 16:27:19 +00:00
wiz
bca510b70c Add -n to usage. 2012-01-17 08:22:09 +00:00
pgoyette
440a886090 Enhance drvctl -p processing to handle new autoconfig info in property
dictionaries.
2012-01-16 19:43:50 +00:00
christos
7f5fd4a5cd PR/45842: Henning Petersen: compare fgets with NULL not 0 2012-01-16 17:38:16 +00:00
perseant
4ab567960c Correct fragment extension calculation in pass6, to avoid putting
negative block counts on inodes during roll-forward.
2012-01-05 16:18:00 +00:00
drochner
8fd6dadaf8 include <netipsec/ipsec.h> rather than <netinet6/ipsec.h> from userland
where possible, for consistency and compatibility to FreeBSD
(exception: KAME specific statistics gathering in netstat(1) and systat(1))
2012-01-04 16:09:40 +00:00
drochner
3712f81ced -consistently use "char *" for the compiled policy buffer in the
ipsec_*_policy() functions, as it was documented and used by clients
-remove "ipsec_policy_t" which was undocumented and only present
 in the KAME version of the ipsec.h header
-misc cleanup of historical artefacts, and to remove unnecessary
 differences between KAME ans FAST_IPSEC
2012-01-04 15:55:35 +00:00
wiz
68693617f8 Remove trailing whitespace. 2012-01-04 10:57:40 +00:00
riz
99370de066 According to most other OSes and documentation sources, an MBR has
one "extended" partition and the partitions inside that are "logical"
partitions.  Make fdisk(8) man page follow suit.

Patch from Julian Fagir in PR#45695.
2011-12-31 22:18:56 +00:00
christos
b8425b06fb PR/45759: Khanh-Dang Nguyen Thu Lam: slattach(8) is not compatible with
pseudo-terminals. Fixed by ignoring the error for the DTR ioctl.
2011-12-30 03:19:36 +00:00
christos
76898fae15 Off by one and clarity improvement from Christian Biere 2011-12-26 00:20:43 +00:00
christos
9feffc5f5a PR/45661: Henning Petersen: Overlapping buffer in route.c. 2011-12-24 23:48:17 +00:00
riastradh
dade315727 Fix error reporting in puffs_framev_enqueue_waitevent and callers.
ok christos
2011-12-19 15:36:26 +00:00
apb
d560323cc4 Make "rndctl -L" overwrite the file with zeros, not with the
same data that was just read from the file.
2011-12-17 13:18:20 +00:00
phx
01173747fc Amiga wscons/Xorg support, first phase.
Implemented wscons for CV64 and CV64/3D. Other graphics cards drivers are
prepared for it, but will not be attempted before Xorg is not running.
The wscons support is disabled by default. A GENERIC kernel should behave
like always. Use WSCONS to try out a kernel with wscons support.
Done by rkujawa@ and phx@.
2011-12-15 14:25:12 +00:00
jmcneill
104b886e37 exit 0 on success 2011-12-04 13:01:54 +00:00
christos
765bd39696 Also ignore out of space conditions for -I so we can create overlapping
partitions on a full disk. Document and add it to the options.
2011-12-02 15:21:15 +00:00
enami
ecc71da821 Add missing -F flag and -I flag in usage. Sort the order to match
manpage.
2011-12-02 04:05:20 +00:00
christos
6d19ec83d5 put the error check in the conditional where it belongs. 2011-12-02 03:04:11 +00:00
wiz
1b8846959e Remove trailing whitespace. 2011-12-01 23:14:06 +00:00
christos
7bef7412af Add a flag to support writing overlapping partitions and explain why. 2011-12-01 22:24:29 +00:00
ahoka
dfffc92f05 add known bugs
fix license (copypaste)
2011-11-29 13:27:50 +00:00
tls
aae64c95c0 Make the rndsave structure public -- the kernel will learn to read it
and sysinst may learn to write it (since, on some systems, most of
the keyboard input they ever get happens to be during install).  Fix a
couple of minor problems with the random_seed rc script addition.
2011-11-26 01:17:17 +00:00
wiz
3184ff8634 Add RCS Id, sort sections, sort SEE ALSO, use more markup.
XXX: is the license correct? it is for jmmv.
2011-11-24 16:20:35 +00:00
ahoka
ccfcc4b31e Import mount_chfs for CHFS. 2011-11-24 15:54:54 +00:00
wiz
69d02ecf2f Sort option descriptions, bump date for previous. 2011-11-23 12:15:30 +00:00
tls
4924aa205a Load entropy at system boot (only works at securelevel < 1); save
at system shutdown.  Disable with random_seed=NO in rc.conf if desired.

Goes to some trouble to never load or save to network filesystems.

Entropy should really be loaded by the boot loader but I am still
sorting out how to pass it to the kernel.
2011-11-23 10:47:48 +00:00
njoly
35d9543121 Fix title and xrefs. 2011-11-21 08:23:20 +00:00
agc
38a27f5af8 simplify code by removing a useless "#define STATIC static" in both debug
and normal usage, and all of its uses.
2011-11-20 01:23:57 +00:00
agc
76ad6f22c6 give the correct count of arguments to the sub-functions 2011-11-20 01:14:17 +00:00
joerg
549f044e13 Use __dead 2011-11-17 16:20:47 +00:00
riz
262c7a9290 Build and install new in-kernel iscsi initiator kernel module and associated
binaries (iscsid, iscsictl) if MKISCSI != no.  Initiator can also be built
into a kernel by adding 'pseudo-device iscsi' in kernel configuration.
2011-11-15 16:50:43 +00:00
christos
29c49ee745 use getfstypename 2011-11-13 22:04:51 +00:00
gdt
c9bfbf1142 Move RTF_ANNOUNCE flag so that it no longer conflicts with RTF_PROTO2.
RTF_ANNOUNCE was defined as RTF_PROTO2.  The flag is used to indicated
that host should act as a proxy for a link level arp or ndp request.
(If RTF_PROTO2 is used as an experimental flag (as advertised),
various problems can occur.)

This commit provides a first-class definition with its own bit for
RTF_ANNOUNCE, removes the old aliasing definitions, and adds support
for the new RTF_ANNOUNCE flag to netstat(8) and route(8).,

Also, remove unused RTF_ flags that collide with RTF_PROTO1:
  netinet/icmp6.h defined RTF_PROBEMTU as RTF_PROTO1
  netinet/if_inarp.h defined RTF_USETRAILERS as RTF_PROTO1
  (Neither of these flags are used anywhere.  Both have been removed
  to reduce chances of collision with RTF_PROTO1.)

Figuring this out and the diff are the work of Beverly Schwartz of
BBN.

(Passed release build, boot in VM, with no apparently related atf
failures.)

Approved for Public Release, Distribution Unlimited
This material is based upon work supported by the Defense Advanced
Research Projects Agency and Space and Naval Warfare Systems Center,
Pacific, under Contract No. N66001-09-C-2073.
2011-11-11 15:09:32 +00:00
wiz
7b2c1e970a Add an EXAMPLE section showing how to add a swap file system using gpt. Bump date. 2011-11-11 13:26:45 +00:00
jakllsch
b052e03160 Constify structure pointed to by getataparams() return value. 2011-10-31 15:26:11 +00:00
jakllsch
bfe1863ea2 Remove write-only variable. 2011-10-31 14:50:10 +00:00
jakllsch
58fe39198a Wrap or shorten lines longer than 80 columns. 2011-10-31 14:44:07 +00:00
christos
1309a94f0a remove some lint 2011-10-30 18:40:06 +00:00
christos
f772004800 cleanup some messy casts and type violations.
XXX: There is one piece of code I marked that does not make sense.
Someone should take a look at it.
2011-10-29 16:54:49 +00:00
jakllsch
34ce9c94ba use C99 fixed-width integer types 2011-10-24 19:15:42 +00:00
jakllsch
fbc01b29da constify 2011-10-24 19:13:03 +00:00
jakllsch
44a52e4ad8 change lines containing only whitespace to empty lines,
remove trailing whitespace
2011-10-24 15:56:17 +00:00
christos
2360984d25 add printflike and fix the format error. 2011-10-23 23:41:56 +00:00
agc
75a17f3ce7 Start to move the in-kernel iSCSI initiator, kindly contributed to the
NetBSD Foundation by Wasabi Systems, from

	othersrc/external/bsd/iscsi/{iscsictl,iscsid}

to

	src/sbin/{iscsictl,iscsid}
2011-10-23 21:11:23 +00:00
dyoung
91e31ba9fe Don't print the silly header, "Properties for device `xxx0':", before
the device properties if the -n option was given.
2011-10-19 22:13:46 +00:00
christos
f42bf26590 PR/45456: Tetsuya Isaki: Don't mix stdio and write. 2011-10-12 16:45:37 +00:00
christos
daed4f8c46 fix the date. 2011-10-12 16:41:47 +00:00
martin
dfa74ee736 Two small fixes from David H. Gutteridge in PR bin/45454. 2011-10-12 10:33:14 +00:00
joerg
f843de8680 Simplify. 2011-10-07 09:56:15 +00:00
dholland
adcc6f36b6 Fix thinko about halt vs. poweroff; from Moritz Wilhelmy in PR 45141. 2011-10-04 07:25:34 +00:00
pgoyette
0b5ef36c08 Fix typo 2011-10-01 02:55:00 +00:00
mrg
1ca3e5d8c0 print the serial number as an unsigned number. 2011-09-28 10:29:41 +00:00
wiz
82c488769a Minimally document gpt recover. Bump date. 2011-09-19 10:40:35 +00:00
plunky
2b8aaed8cd NULL does not need a cast, here 2011-09-16 16:13:16 +00:00
joerg
bd80b77cd9 Use __dead. Save a pointer. 2011-09-16 15:42:56 +00:00
wiz
369bd71deb Consistently spell MS-DOS with a hyphen. From Snader_LB. 2011-09-15 09:44:59 +00:00
christos
42d1e41665 print the missing flag if missing argument... 2011-09-13 19:55:28 +00:00
wiz
c94449f6a8 Fix typo. 2011-09-13 08:54:11 +00:00
christos
8b1d441333 document that dumpdir is now optional 2011-09-12 21:22:27 +00:00
christos
7249eb3f75 - always print corrupted dump messages instead of silently failing
- don't require /var/crash to be specified, default to it
- determine and print the kernel name
- print all messages to syslog
2011-09-12 21:22:07 +00:00
christos
bdfab20ffb print summary stats. 2011-09-11 17:18:52 +00:00
wiz
72a60d8cd5 Another option order fix. 2011-09-10 20:47:33 +00:00
wiz
51f435b8eb Sort options and descriptions in standard order.
Remove unecessary Bk/Ek in SYNOPSIS.
2011-09-10 20:46:43 +00:00
christos
e8ad09e0b7 PR/45257: Instead of passing a 32bit sec and 32 bit usec timestamp in little
endian format by default, pass a struct timespec in native host format. Add
-C flag to produce a compatible timestamp like before.
2011-09-10 20:04:28 +00:00
riz
b146b6f7a7 Build and install the skeleton manpage for devpubd - it's better than
nothing.
2011-09-06 21:30:12 +00:00
christos
9bf741a041 put back the byte swapping code, and remove the double byte swapping. 2011-08-31 22:27:26 +00:00
riz
e14f406cd9 Remove erroneous seq=ntohs(seq) introduced in rev. 1.74, which caused
icmp_seq numbers to increment by 256 instead of 1 on LE platforms.
2011-08-31 22:05:57 +00:00
bouyer
a47e2eb758 Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
2011-08-30 12:39:49 +00:00
bouyer
d8593e7a9a PR bin/45299: print FBMASK not FFMASK when lfs_fbmask is incorrect. 2011-08-29 18:43:20 +00:00
joerg
baa8e84b6f Use __dead 2011-08-29 14:34:58 +00:00
joerg
693655118a static + __dead 2011-08-29 14:29:21 +00:00
wiz
5febc69036 Add minimal devpubd man page, not hooked into the build yet.
XXX: someone should write drvctl(4)
2011-08-29 14:21:50 +00:00
jruoho
7fc7b88321 Remove a comma. From "Snader_LB" on freenode. 2011-08-29 11:47:46 +00:00
mrg
f385d8f556 add the device publish daemon, written by jmcneill@.
listens on drvctl for new devices and invokes MAKEDEV for them.

missing:
  - manual page
  - rc.d script
  - more testing

but it works well enough to make new disk nodes appear in /dev when
netbsd sees them and they're missing.  you will need to make sure
you have a new /dev/MAKEDEV for this to work properly (postinstall
should handle this normally, of course.)


thanks jared!
2011-08-29 11:38:48 +00:00
wiz
f91d202feb Move a sentence to where it makes more sense. 2011-08-28 21:25:11 +00:00
wiz
6964284f70 New sentence, new line. 2011-08-28 17:15:16 +00:00
gson
d2c5449570 fix the sparc build 2011-08-28 15:46:26 +00:00
christos
694c2250cf make it compile with SMALLPROG 2011-08-28 10:13:03 +00:00
mbalmer
eba5829387 Remove duplicate static. 2011-08-28 08:43:02 +00:00
christos
4d53e32690 one static is enough, otherwise you risk zapping yourself. 2011-08-27 20:49:03 +00:00
joerg
e837071dcc Mark yyerror as static and dead. 2011-08-27 19:01:34 +00:00
joerg
b79356001b static + __dead 2011-08-27 18:57:50 +00:00
joerg
8d4273fcb4 __dead + kill main prototype. 2011-08-27 18:55:58 +00:00
joerg
bab034bac4 static + __dead 2011-08-27 18:55:21 +00:00
joerg
8bdebf9d52 statc + __dead 2011-08-27 18:54:39 +00:00
joerg
fdbae3b9b7 static + const + __dead 2011-08-27 18:48:59 +00:00
joerg
eccb2789c7 static + __dead 2011-08-27 18:44:44 +00:00
joerg
3fedada239 static + __dead + G/C pathmtu 2011-08-27 18:43:24 +00:00
joerg
c6d7b0bb59 static + __dead 2011-08-27 18:37:41 +00:00
joerg
c0a388c8b2 Be more static. 2011-08-27 17:45:30 +00:00
joerg
d2ac3967fe Be more static 2011-08-27 17:43:42 +00:00
joerg
a4b65553ae Use __dead 2011-08-27 17:38:16 +00:00
joerg
8e00898905 static + __dead 2011-08-27 17:36:05 +00:00
joerg
6923d07c1a Use __dead and __printflike. 2011-08-27 17:34:44 +00:00
joerg
9c28fb5747 staticfy. __dead. 2011-08-27 17:16:01 +00:00
joerg
9f300e34f1 static. dead. 2011-08-27 17:07:28 +00:00
joerg
22db016bc9 Mark usage as static and dead. 2011-08-27 16:43:07 +00:00
christos
17187885c3 PR/45301: Julian Fagir: make clear that the unit is sectors and fix a typo.
While there, use errx, and sizeof(*var) instead of sizeof(type)
2011-08-27 16:34:57 +00:00
joerg
307d355803 staticfy. __dead. 2011-08-27 16:34:38 +00:00
joerg
fbefc91819 static. __dead. 2011-08-27 16:29:51 +00:00
joerg
1a61ef5ea6 staticfy. Use __dead. 2011-08-27 16:12:54 +00:00
joerg
1cd05199a0 staticfy. Use __nodead 2011-08-27 16:10:51 +00:00
joerg
0927b2bcb2 staticfy. Use __dead. 2011-08-27 16:05:27 +00:00
joerg
dbf6e7953c Avoid magic manipulation of the format string. 2011-08-25 16:17:58 +00:00
joerg
cf30c8e1b5 main.c uses non-literal format strings. 2011-08-25 16:12:37 +00:00
christos
a14203e91d Instead of using strncat and re-scanning the strings all the time, use and
append printf function.
2011-08-24 12:15:44 +00:00
christos
7b373c7105 handle the first loop where time == 0. 2011-08-21 06:39:09 +00:00
christos
6ffa97db52 we need difftime to return a signed result, so clamp the timeval's to
uint32_t but then, return a signed result of their difference.
2011-08-20 14:38:09 +00:00
christos
3ca3bc9b9b PR/45257: Ryo Shimizu: ping(8) prints bogus round-trip times after Year 2038
Clamp all time computations to 32 bits; idea from dsl@
2011-08-19 08:35:40 +00:00
phx
233e75c9c0 Define USE_MBR for ofppc. 2011-08-18 08:42:07 +00:00
martin
9a8267aad8 Fix sign compare bugs 2011-08-17 12:27:50 +00:00
jakllsch
fdc9473539 Ajdust bootcode file name from mbr_gpt to gptmbr.bin. 2011-08-17 00:45:55 +00:00
jakllsch
f43df25dd7 Switch 'gpt biosboot' to support T13 EDD-4 annex A GPT hybrid MBR instead
of a home-grown MBR/VBR hand off protocol.

'biosboot' now will set the legacy BIOS boot flag instead of patching a
GUID into the MBR.
2011-08-17 00:04:41 +00:00