Commit Graph

5727 Commits

Author SHA1 Message Date
uch
5c1ba4adfa Fixed the problem that partition size over 8GiB(v7fs filesystem limit) failed newfs. 2011-07-22 09:15:10 +00:00
tron
64edb24382 Use howmany() macro as it is used in a lot fo places in this tool anyway
as suggested by Tsugutomo Enami.
2011-07-19 19:57:54 +00:00
joerg
29d01baadc Allow cross-compiling from Linux 2011-07-19 18:29:41 +00:00
tron
4cafa08a7d Don't use roundup2(9) (which should have been howmany(9) anyway) to
fix builds on platforms other than NetBSD.
2011-07-18 22:50:28 +00:00
apb
f1ca1ce2bf In sources that get compiled into the tools version of makefs, add:
#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif

This should fix cross-build problems, but I can't really test
that now, so I am not re-enabling the inclusion of v7fs support
in makefs.
2011-07-18 21:51:49 +00:00
dholland
99f3bafa7f prune stray commas 2011-07-17 23:46:53 +00:00
uch
8ef6a31f0e fix freeblock counting 2011-07-17 12:47:38 +00:00
dholland
9474f05d3b Don't need to initialize (one of) the elements now in i_crap; nothing in
here touches that material.
2011-07-12 02:46:03 +00:00
uch
a2917fcf47 fix freeblock count bug. 2011-07-10 12:14:01 +00:00
mrg
4cd6566dd0 switch from an ugly cast and ntohl() usage to be32dec(). use sizeof.
idea from dh, and fixes a GCC 4.5 warning.
2011-07-06 09:02:54 +00:00
dholland
a1d28c6e00 fix typo 2011-07-03 19:05:10 +00:00
mrg
db6886e029 apply some -O0 with gcc 4.5 and vax. 2011-07-03 15:29:34 +00:00
wiz
3fa42aac82 Whitespace nit. 2011-07-03 09:15:20 +00:00
kefren
008758606b Mention -mpls and -tag and xref mpls(4)
bin/45071
2011-07-03 07:20:37 +00:00
joerg
017dd250ef Fix memset usage. 2011-07-01 02:46:24 +00:00
mrg
b7e452c793 remove HAVE_GCC == 4 conditional 2011-07-01 01:26:15 +00:00
wiz
e0f576648b Various improvements. 2011-06-27 13:50:31 +00:00
uch
9255b46fb4 7th Edition(V7) File System support. and NetBSD symbolic-link, socket, FIFO extension. see newfs_v7fs(8). 2011-06-27 11:52:22 +00:00
mrg
d993dd3b69 when checking for SKSV data, use the same test as before. fixes an
always true conditional GCC 4.5 found, and is also a real bug fix.
2011-06-22 05:18:03 +00:00
kefren
2715676450 don't compile tag functions if SMALL is defined. Should fix the build 2011-06-22 04:57:28 +00:00
mrg
c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
kefren
0c463ade62 Alloc dynamically sockunions in sou.
Teach route(8) about multiple tags. E.G.: -tag 100,20,33
XXX: needs documentation
2011-06-21 14:33:14 +00:00
mrg
2c77b0841d avoid code that looks like this:
x = x = y;
since GCC 4.5 complains about it having sequence point issues.
2011-06-21 09:36:46 +00:00
mrg
75e42fa7da remove most of the remaining HAVE_GCC tests that are always true in
the modern world.
2011-06-20 07:43:56 +00:00
wiz
6da344d4e1 New sentence, new line; fix wording; bump date. 2011-06-17 18:13:14 +00:00
manu
448e1c49b2 Add mount -o extattr option to enable extended attributs (corrently only
for UFS1).
Remove kernel option for EA backing store autocreation and do it by
default. Add a sysctl so that autocreated attriutr size can be modified.
2011-06-17 14:23:50 +00:00
yamt
26f4e9f9b1 xref link_addr for -link. 2011-06-16 23:35:35 +00:00
christos
453164da22 fix compilation. 2011-06-09 21:23:29 +00:00
christos
23ffdf5bd3 share more code. 2011-06-09 19:57:50 +00:00
bouyer
a3a7248ce7 Fix bad cut'n'paste in copyright. Pointed out by dyoung@ 2011-06-07 14:56:12 +00:00
pgoyette
5647caf8d0 Keep printf() happy - cast the max name length to type int 2011-06-03 16:35:35 +00:00
nonaka
66224643cd fix output format for long module name. 2011-06-03 15:34:46 +00:00
jruoho
dd4ef98f2e Clarify placement of commas. From Snader_LB on freenode/#netbsd-code. 2011-06-01 09:46:48 +00:00
riastradh
63cdfaffb6 Fix typo: `symbolically' takes three l's, not two. 2011-05-31 16:17:30 +00:00
joerg
a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
reinoud
43e731a9af Fix accidental use of logical && instead of binary & in rare case.
Bug noticed by Joerg and clang :)
2011-05-26 07:59:08 +00:00
joerg
8c28cc4858 Simplify 2011-05-25 15:34:19 +00:00
joerg
77103d874a input is unused 2011-05-24 12:07:14 +00:00
joerg
14d428746e input is unused. 2011-05-24 12:06:25 +00:00
joerg
39a0f733b0 Decide on printing an int as int and not as short. 2011-05-24 12:04:18 +00:00
joerg
52b2e3b827 Use bitwise operators, logical and with a constant doesn't make sense 2011-05-24 12:03:04 +00:00
joerg
b1162954df Don't use address strings as format string. 2011-05-24 11:38:56 +00:00
riastradh
d9e31e357d Make `mount_ptyfs -c' actually work.
The ALTF_* are bit masks, not indices, so use 4, not 3, for the one
after 2.  Use 0x on all the values to emphasize this.

ok rmind
2011-05-21 20:05:02 +00:00
dholland
aae84c3a7c Improve documentation of FFS formats and format levels from PR 32100.
Prompted also by recent discussion on tech-kern. Bump date.
2011-05-14 19:46:10 +00:00
pgoyette
821775e983 Fix parsing of -A option so that the [/ptn_0_offset] part is optional, as
described in the man page.
2011-05-08 14:22:16 +00:00
wiz
36fa577686 Re-add -q description that got lost when -x was added.
Sort descriptions.
Bump date.
2011-04-29 10:34:52 +00:00
wiz
1f03b58936 Sort options and option descriptions. Fix a typo. New sentence, new line. 2011-04-28 17:17:51 +00:00
wiz
b882daa546 New sentence, new line. Sort sections. 2011-04-28 12:16:10 +00:00
wiz
ed5cd81dad Mark up file as argument. 2011-04-28 12:01:58 +00:00
wiz
85e4f3c354 security(7), not (8). 2011-04-28 11:23:57 +00:00
wiz
a26db019aa Use Nx. 2011-04-25 22:23:47 +00:00
wiz
1319ff4810 Add serial comma. 2011-04-25 22:09:29 +00:00
christos
00740dd48f PR/44864: Paul Ripke: Compile regular expressions on demand and only once. 2011-04-16 01:15:54 +00:00
joerg
f9bbef6fd3 Extend CPPFLAGS, don't replace it 2011-04-10 16:47:04 +00:00
jym
8049d1e8e5 Document biosboot. Xref boot(8) and installboot(8). 2011-03-27 01:01:07 +00:00
bouyer
875bb8e6c3 initialise memory allocated for uquot_user_hash & uquot_group_hash.
Pointed out by Nicolas Joly.
2011-03-20 11:41:24 +00:00
wiz
8daed3c318 Add missing comma. 2011-03-19 08:41:19 +00:00
jruoho
5c4331b81a Xref x86/ichlpcib(4) instead of ichlpcib(4). 2011-03-18 21:22:04 +00:00
pooka
3e81f0bf9e Make get/setuid prog ops (so that i can do rump.ping -f regardless
of host privs).
2011-03-11 09:59:56 +00:00
wiz
492cea3a3d Fix punctuation markup; new sentence, new line. 2011-03-06 17:21:08 +00:00
wiz
d2eb4c303d New sentence, new line. 2011-03-06 17:20:28 +00:00
bouyer
063f96f3c2 merge the bouyer-quota2 branch. This adds a new on-disk format
to store disk quota usage and limits, integrated with ffs
metadata. Usage is checked by fsck_ffs (no more quotacheck)
and is covered by the WAPBL journal. Enabled with kernel
option QUOTA2 (added where QUOTA was enabled in kernel config files),
turned on with tunefs(8) on a per-filesystem
basis. mount_mfs(8) can also turn quotas on.

See http://mail-index.netbsd.org/tech-kern/2011/02/19/msg010025.html
for details.
2011-03-06 17:08:10 +00:00
pooka
d69295fda4 Set errno to 0 before strtoll() so that it can reliably be tested
afterwards.  Fixes newfs_msdos at least on sparc.  Incidentally,
the msdosfs tests also start working on sparc, which about halves
the number of test failures on that platform.
2011-03-05 13:47:43 +00:00
hannken
05e91bfee8 fss(4): Allow FSSIOCSET to set the initial flags. Add a new flag
"FSS_UNLINK_ON_CREATE" to unlink the backing store before
        the snapshot gets created.

With this change dump(8) no longer dumps the zero-sized, but named
snapshot it is working on.  Same applies to fsck_ffs(8).
2011-02-24 09:38:57 +00:00
njoly
eeec3853c8 Small typo in macro (Ii -> It). 2011-02-21 17:05:50 +00:00
christos
6df320733c undo part of the previous patch, which I suspect is bad. 2011-02-20 21:42:50 +00:00
enami
ec02ea412c Define accessors for number of blocks and partition size in the
component label and use them where appropriate.  Disscussed on tech-kern.
2011-02-19 07:11:09 +00:00
pooka
0120167d51 "when in doubt, let the kernel decide" 2011-02-17 16:57:46 +00:00
wiz
adc40ee487 Add -b and -vxz to usage. 2011-02-16 19:33:48 +00:00
wiz
2d50779420 Add -vxz to SYNOPSIS. Sort. 2011-02-16 19:33:39 +00:00
wiz
32cebeb729 Add -vxz to SYNOPSIS and usage. 2011-02-16 19:32:26 +00:00
dyoung
00ef49e965 Add flags -v, -x, and -z for verbose, debug, and silent shutdowns,
respectively, by passing flags AB_VERBOSE, AB_DEBUG, and/or AB_SILENT to
reboot(2).
2011-02-16 17:53:31 +00:00
dholland
df520b1013 Disable COMPAT_386BSD_MBRPART. The code is still here if anyone needs it
for some reason. (But I have no idea why that would be -- if you have one
of these really ancient partitions and you're about to run disklabel, you
can easily run fdisk first and change the partition type to NetBSD.)

As it stands, the code will munch FreeBSD installs under some
circumstances, which is really not acceptable behavior.

The code, along with the kernel support that's been disabled by
default for several years, and some related but less dangerous code in
sysinst, should prboably be removed entirely after -6 is branched.

Discussed on tech-kern and tech-userlevel; closes PR 44496.

This is also almost certainly the cause of PR 42521 and PR 38841.
2011-02-12 22:23:01 +00:00
pooka
a804f47907 Exterminate a bug I created in 2009. 2011-02-09 11:22:49 +00:00
schnoebe
431ec7cce7 List all the aliases supported for GPT partition types. 2011-02-09 05:11:15 +00:00
pgoyette
4f8abcabc1 Use PRIu64 to fix build on amd64 (and presumably other 64-bit ports) 2011-02-08 13:58:54 +00:00
wiz
b3b821c790 Fix typos. 2011-02-08 09:51:55 +00:00
wiz
49efa429e3 Improve a bit. 2011-02-08 09:49:07 +00:00
haad
83425a0f36 Initial import of libdm and dmctl to tree. libdm library can be used
to access, manage and manipulate device-mapper driver. Which opens us bunch
of new possibilities like

	dm-multipath device target
	dm-crypt     device target
	dm-ccd 	     compatibility layer

With this import I'm bringing in dmctl tool for working with dm driver ,too.
I plan to replace gpl2 licensed dmsetup command with our dmctl tool in near
feature. It can also by placed to /rescue where we was not able to put
dmsetup because of licensing problems.

With libdm in tree we can now write RUMP atf test suite for dm driver to
ensure LVM subsystem stability as time goes.

Reviewed by: blymn@ and rmind@
Oked: by no objections on tech-userlevel@
2011-02-08 03:20:13 +00:00
christos
b805ecec3f PR/44529: Martin Danielsson: fsck_msdos crashes when verifying corrupt file
system. Avoid using the long name index when it is 0. Refactor the code to
avoid duplication.
2011-02-07 17:36:42 +00:00
pooka
b915a641c8 update macro names to match new ones
(i don't know why they changed, just fixing the build)
2011-02-06 21:38:09 +00:00
njoly
0913e1dac9 Do Skip device checks, which ends up parsing fstab, when working on a
filesystem image with -F option set.
2011-02-06 12:02:59 +00:00
martin
82fe9809af Use RT_ROUNDUP() and friends from sys/route.h instead of homegrown
variants.
2011-02-04 14:31:23 +00:00
matt
4d5d6d9aa5 Add a new AF/PF_ROUTE which is 64-bit clean which makes the routing socket
interface (and its associated sysctls) act identically for both 32 and 64 bit
programs.  The old unclean one remains for backward compatibility.
2011-02-01 01:39:19 +00:00
reinoud
f6164dfe20 When requesting to disable metadata partitions, also disable low formatting.
When no meta and not low formatting we can lower the required UDF version.
2011-01-21 22:32:13 +00:00
reinoud
e08c1f2c44 Fix typo in comment 2011-01-21 22:10:51 +00:00
nisimura
ba19dd6c6f fix mislabelled S.M.A.R.T. lifetime temperature record reading. 2011-01-19 07:55:12 +00:00
jmcneill
21b4f7d5bd Xr acpiwdrt(4) 2011-01-17 16:09:48 +00:00
nisimura
819cda4abe fix a mysterious indent lossage roaming around for last couple of years. 2011-01-14 06:02:57 +00:00
haad
a3f1560397 Use SYMLINKS, I'm not sure why I ahve commited old version of my patch, but
it should be ok now. Thanks to tron@ for pointing at this issue.
2011-01-13 23:44:11 +00:00
haad
6f5bb5ac37 Move chown from usr.sbin to sbin and chgrp from usr.bin to bin directories.
This was discussed and oked on tech-userlevel I have run full build release,
test anita cycle with this patch.
2011-01-13 22:28:35 +00:00
pooka
2fff573bcd In case we are union-mounting /, don't force MNT_UPDATE. This makes
the following work:

	mount -t tmpfs -o union tmpfs /

(some caveats are implied, such as if you "mkdir /usr" you're
screwed, but then again you'll get there with "rm -rf /usr" even
without union -- we supply rope)

per discussion with zafer, use case for jibbed
2011-01-13 11:57:02 +00:00
apb
63df928b37 Change printf formats to match the data type of the values being
printed.  There's now a lot of PRIu16 and PRIu32, some PRIu8, some
SCNu32, and a few cases where %u and %d were reversed.  Multiplication
of 32-bit and 8-bit values is cast to uint64_t and printed with PRIu64.

Inspired by a report from Patrick Welche on current-users.
2011-01-06 21:39:01 +00:00
christos
621e83eac4 match printf formats and types from Patrick Welche 2011-01-06 19:34:28 +00:00
riz
e048211e44 Clarify the 'dkctl addwedge' usage message after creating a GPT
partition.
2011-01-06 17:51:28 +00:00
jakllsch
1f8f195455 Use less bogus CHS addresses in PMBR.
With the ending head set at 0xff one machine I have will never leave
the initial startup screen if such a disk is present.  Additionally,
Wikipedia suggests without citiation that 254 is the maximium allowable
value for the head, and this seems to be the case.
2011-01-06 17:42:10 +00:00
jakllsch
5da707b805 UFS is called FFS in the NetBSD case. Display as such and accept as input. 2011-01-06 16:30:40 +00:00
jakllsch
a5fb435357 Support booting from GPT-partioned disks on PC-BIOS-compatible systems.
Much of the work in this commit was done by Mike Volokhov during GSoC 2009.
2011-01-06 01:08:48 +00:00
riz
d765f2d25b Add support for byteswapped file systems (big-endian on little-endian
host, and vice versa), to fix PR#44203.

Add support for growing (but not yet shrinking) UFS2 file systems.  Partially
addresses PR#44205.

While I'm here, reformat the code for closer adherence to KNF.

Fairly extensive testing was performed, using the shortly-to-be-committed
updated ATF tests.  Patch posted to tech-userlevel on 21 December 2010,
no comments.
2011-01-05 02:18:15 +00:00
wiz
a88611257c Fix fd leaks. Found by cppcheck. 2011-01-04 23:48:44 +00:00
wiz
80172dbf65 Fix fd leak. Found by cppcheck. 2011-01-04 23:46:34 +00:00
wiz
96a10eac53 Fix memory leaks. Found by cppcheck. 2011-01-04 23:42:48 +00:00
wiz
c3ffe691ad Use pclose for popened handles. Found by cppcheck. 2011-01-04 23:36:23 +00:00
wiz
23f77c56dc Fix file descriptor leak. Found by cppcheck. 2011-01-04 23:31:29 +00:00
wiz
a5d0318667 Use Nm. Bump date for previous. 2011-01-04 23:29:51 +00:00
spz
570cdc45bf add notes what 'device' is and also rub in that addwedge doesn't
create stuff on disk a bit more.
2011-01-04 21:42:10 +00:00
hauke
34b397c5e6 First release that shipped wdogctl(8) was 1.6, not 1.5.1. 2010-12-23 14:29:52 +00:00
riz
98ddf5ec73 Revert previous - inadvertant commit to wrong repository. 2010-12-20 00:49:23 +00:00
riz
3123e6a7e0 Pull in change from njoly@ in -current 2010-12-20 00:44:53 +00:00
njoly
e7c4f98be6 Add missing .Os macro. 2010-12-19 23:22:46 +00:00
pooka
db818c53ab Use RUMPPRG.
ok Greg Oster
2010-12-15 18:37:55 +00:00
wiz
c93380eba7 filesystem -> file system. 2010-12-14 21:49:21 +00:00
riz
a3a3268f75 Be explicit about byteswapped and ffsv2 file systems being currently
unsupported, while catching up to some changes in my local tree which
will hopefully support them at some time in the future.

Also, change "device" variable to "special", to reflect the fact
that resize_ffs will work on a plain file.
2010-12-14 20:45:22 +00:00
pooka
5f732a29cb Convert from the oldstyle cgd_kops.op_open to the newstyle prog_open
and define RUMPPRG.  Get rid of the Makefile.inc stuff, since it was
useful only for the oldstyle regime.
2010-12-14 17:46:21 +00:00
jruoho
91e230c6b8 Fix xref; module(4) -> module(7). 2010-12-14 16:23:59 +00:00
pooka
72e657672d A few weeks ago when i added "linkstr" support I didn't know that
the string parser gives a proplib object which isn't a terminated
string.  Fix that mistake now.
2010-12-14 10:51:51 +00:00
riz
16963047ea Don't special-case v1 superblocks - especially with an incorrect
calculation.
2010-12-14 04:04:20 +00:00
pooka
67a4f392d8 use crunchops for crunchables 2010-12-13 21:48:01 +00:00
pooka
e73ffdda13 Add rump client support for module utilities. It should be noted
that while modstat and modunload and builtin modules work exactly
the same as in the host case, modload loads file system kernel
modules from the rump kernel namespace.  By default, archs which
have rump support for the kernel kernel ABI have the host module
directory mapped into the rump kernel namespace at the same location
(/stand/...).  Therefore, if the *host* module directory is populated,
"rump.modload foo" will work as expected.  Otherwise, RUMP_MODULEBASE
can be used to point to the module directory.
2010-12-13 20:48:44 +00:00
pooka
e8de1d91d0 be a happy crunch build 2010-12-13 19:19:10 +00:00
njoly
6c19f9ea7b op_read return value is a ssize_t, not an int. 2010-12-13 19:17:20 +00:00
pooka
f9740ada7f RUMP_ACTION -> RUMPPRG 2010-12-13 17:42:17 +00:00
pooka
e3d9b779d8 Convert from RUMP_ACTION to RUMPPRG. 2010-12-13 17:39:47 +00:00
pooka
a415ef09e9 Convert from the .ifdef RUMP_ACTION stuff to RUMPPRG. 2010-12-13 17:35:08 +00:00
jruoho
05a9f55544 Xref module(4). 2010-12-13 10:07:46 +00:00
riz
d365bee0c8 Remove bogus check which is not actually testing anything useful,
and depending on file system data, can actually be a false error.

Fixes what I was actually testing for in bin/44209, though the
actual problem was not what I originally described.
2010-12-12 22:48:59 +00:00
mhitch
a7e78491e5 Add support for old ffsv1 superblocks. After reading an old superblock,
copy appropriate data to where they are expected in the updated superblock.
When writing the updated superblock, move the updated values back to the
old ffsv1 superblock locations.  Also check for old superblock format when
updating the last cylinder group and adjust cg_old_ncyl appropriately.
Derived from how mksf sets them.  Should address PR bin/44209.
2010-12-12 19:53:23 +00:00
pooka
a97eadf766 multicore update 2010-12-12 11:38:42 +00:00
riz
6a4bbd2cea Remove accidentally-resurrected TODO item. 2010-12-08 15:23:53 +00:00
riz
8966eced0b If we're operating on a plain file instead of a device, ftruncate() it
to ensure it's been properly extended.  Clears up some problems at certain
blocksizes which showed up during creation of atf tests, which is done
using file-backed file systems.
2010-12-08 00:25:54 +00:00
riz
0b1ff958b5 As currently written, writeat() expects disk blocks, not fs blocks, so
when testing that the last sector of the new size is writeable, make
sure we're ACTUALLY writing in the new space, instead of possibly
overwriting something in the existing fs.

Discovered while writing tests - tests which uncovered file corruption at
certain block sizes.

XXX should rewrite writeat() to expect fs blocks instead of disk blocks.

OK mlelstv@
2010-12-07 23:29:55 +00:00
jmcneill
ed7bfdfad4 Allow for passing more than one module at a time:
$ sudo modunload auvitek xc5000 wintv_eeprom
2010-12-06 23:42:48 +00:00
pooka
39f08af21d mirror change of -lrumpcrypto ==> -lrumpkern_crypto 2010-12-05 20:13:26 +00:00
riz
3485b1dad5 Turns out, plain-file usage is already supported. *blush* 2010-12-03 05:23:34 +00:00
riz
4c7e04789a Knock one off the list. 2010-12-02 22:04:01 +00:00
riz
9f2c8ccc2b Use howmany() instead of "/" to calculate the number of cylinders for
the changed file system, so as to not drop a partial cylinder at the
end.  Fixes PR bin/44177.
2010-12-02 22:00:27 +00:00
elric
297cd81a0d Remove a line that was intended only for my personal testing and that
breaks things.
2010-12-02 18:02:58 +00:00
elric
7de6a71be4 In -G, refuse to operate if KEYGEN_URANDOM is specified as we already do
for KEYGEN_RANDOMKEY.

Print a warning if such a refusal is made---this will help the user understand
why there is an error.

Patch provided by:  Taylor R Campbell <campbell+netbsd@mumble.net>.
2010-12-02 04:54:32 +00:00
riz
6ad0ad89d6 Update TODO for resize_ffs(8), adding some stuff and removing some
ancient bits.
2010-12-01 17:39:54 +00:00
riz
6efa15a79a Do not look for a v1 file system at SBLOCK_UFS2, as this gets the wrong
superblock (first alternate) for a file system with 64k blocks.
Spotted by mhitch@.
2010-12-01 17:39:21 +00:00
riz
18174be827 Clean up this file:
- sync usage comment with current reality
- sort includes
- wrap lines
- use EXIT_FAILURE consistently
- make error messages consistent:  Cannot->Can't
- Remove "Old FFSv1 macros" in favor of system macros in ufs/ffs/fs.h .
  Leave dblksize() because it uses the on-disk dinode structure.

More cleanup is needed.
No functional changes intended.
2010-12-01 17:33:45 +00:00
phx
c122e153ac Allow standalone commands to be recognized, as in the in-kernel keymaps.
Also allow the Cmd token. Examples:
keycode 210 = Cmd Cmd_BrightnessUp
keycode 211 = Cmd_VolumeToggle
2010-11-30 12:22:06 +00:00
riz
6f8b62aac7 Restore a couple of checks for updating the cg_old_ncyl value which
were commented out with XXX and a notation to "fix once fsck is fixed."
fsck seems to have been fixed for this particular issue sometime in the
7 years since the code was brought into the tree.

Update cg_old_niblk instead of cg_ni_blk, since this tool
currently supports ffsv1 only.

With these two changes, I can grow a file system and have the result
be clean according to fsck_ffs.  Shrinking still results in an unclean
file system.

OK mhitch@

While I'm here, fix a typo in an error message.
2010-11-29 19:54:10 +00:00
elric
f130bae6f7 Remove trailing whitespace (patch provided by: Taylor R Campbell
<campbell+netbsd@mumble.net>)
2010-11-27 17:08:36 +00:00
pooka
6070963e92 xref rump_smbfs 2010-11-21 18:33:08 +00:00
pooka
6f2301fb3c Implement ifconfig linkstr as proposed on tech-net. 2010-11-15 22:42:36 +00:00
roy
50de1251a3 Support the new RTM_IFINFO and RTM_CHGADDR messages. 2010-11-12 16:32:18 +00:00
pooka
afd4d3a773 add compile-conditional rumpclient support 2010-11-11 22:56:38 +00:00
pooka
f1d4214202 Update RUMP_ACTION to use rumpclient.
The server must of course have some disks configured.  Let's say
we have this simple server with disks as a few sparse host files:

main()
{
        rump_init();
        rump_pub_etfs_register("/disk1", "./disk1.img", RUMP_ETFS_BLK);
        rump_pub_etfs_register("/disk2", "./disk2.img", RUMP_ETFS_BLK);
        rump_pub_etfs_register("/disk3", "./disk3.img", RUMP_ETFS_BLK);
        rump_pub_etfs_register("/disk4", "./disk4.img", RUMP_ETFS_BLK);
        pause();
}

And we run the server:

mainbus0 (root)
Kernelized RAIDframe activated
/disk1: hostpath ./disk1.img (97 GB)
/disk2: hostpath ./disk2.img (97 GB)
/disk3: hostpath ./disk3.img (97 GB)
/disk4: hostpath ./disk4.img (97 GB)

We can then configure the raid against the server:

> ./raidctl -c theraid.conf raid0

And lo, we have evidence of a level1 raid in the server dmesg:

raid0: RAID Level 1
raid0: Components: /disk1 /disk2 /disk3 /disk4
raid0: Total Sectors: 409599744 (199999 MB)

yea, i initialized it already in a previous run:

> ./raidctl -S raid0
Reconstruction is 100% complete.
Parity Re-write is 100% complete.
Copyback is 100% complete.
2010-11-08 12:42:35 +00:00
pooka
2ddc760fc7 Need getifaddrs() for the rump client since it executes sysctl(2) 2010-11-05 16:23:56 +00:00
pooka
08fc937c06 make sysctl(8) work as a rump client 2010-11-05 15:55:23 +00:00
pooka
7d1c54af24 adapt to new rumpclient_init() signature 2010-11-05 13:52:41 +00:00
hannken
08a60b309b File system snapshots are no longer experimental. 2010-11-05 10:02:53 +00:00
pooka
b10965b180 #ifdef variable correctly 2010-11-04 23:38:18 +00:00
pooka
243f716534 be consistent in what to leave outside of SMALL 2010-11-04 23:37:27 +00:00
pooka
ddce2e059a Support RUMP_ACTION to compile a rump kernel client. 2010-11-04 23:36:10 +00:00
pooka
23c2b7b527 Update RUMP_ACTION to use the newstyle rump client. 2010-11-04 23:31:12 +00:00
wiz
4958aa2ca5 Various improvements. 2010-10-31 11:39:46 +00:00
haad
1e89108160 Add resize_ffs tool to build, change default behaviour to grow filesystem
to device size. Add parameter -s to specify size if user want to shrink
filesystem.

Apply some KNF, remove dead unused code.

Oked by christos@.
2010-10-30 21:16:07 +00:00
martin
d524fd1707 Memcpy into local variable to ensure proper alignement.
Fixes PR port-sparc64/43965.
2010-10-13 09:19:40 +00:00
ahoka
592d1c274a Avoid NaN when calculating std-dev, which fixes a crash on VAX. 2010-09-20 11:49:48 +00:00
drochner
ebb3b30048 minimal ansification/constification 2010-09-12 16:03:39 +00:00
tsutsui
b01393af8c Add a URL of Linux Documentation "The Second Extended Filesystem." 2010-09-10 15:51:20 +00:00
pooka
e596efac61 Add -G to usage, omission pointed out by wiz. Also, make usage format
nicer on a 80col terminal.
2010-08-09 21:14:26 +00:00
wiz
ed08a55d5a Sort option descriptions. 2010-08-09 20:23:20 +00:00
pooka
f87f7774e0 Add -G, which turns consistency check errors in warnings. The
current testing purpose is to create a file system with
block size > MAXPHYS.

(the check doesn't make that much sense anyway in these days of
mobile file systems, since we're interested in MAXPHYS where we
attempt to mount the file system, not where we happen to create it)
2010-08-09 17:20:57 +00:00
pooka
83c92bb41d Make it possible to set the retry timeout as a compile-time define.
This is useful for automated environments where everything (rpcbind,
mountd, nfsd and the client) is started in parallel in a split
second and there is a small chance we will race in there before
everything has been communicated to rpcbind.
2010-07-23 19:25:23 +00:00
mrg
4c92852a80 remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format.  ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k.  this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
  down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
2010-07-06 05:59:50 +00:00
dyoung
aa9db6efb2 Add to the string parse object (pstr), and its constructors, a flag that
tells whether it should detect and convert to binary a hexadecimal octet
string of the form 0x0123ABab, or leave those strings undecoded.

If the argument for a 'media', 'mediamode', 'mediaopt', '-mediaopt',
'nwkey', or 'bssid' keyword is a hexadecimal octet string, do not detect
and decode it.  (Note that setifnwkey decodes hexadecimal strings on its
own.)

This fixes a bug noticed by Jim Miller where the trailing zero-octets
were discarded from hexadecimal octet-string arguments for 'nwkey'.
2010-07-01 16:44:05 +00:00
dyoung
de51d12924 Apparently, -g belongs in the DBG variable, not in CFLAGS. Make it so
on a line that is commented-out in this makefile.
2010-07-01 16:28:21 +00:00
dyoung
83fdd687cf Change a > to a >= to avoid writing to the character after the end of
the buffer passed to get_string().
2010-07-01 16:12:23 +00:00
kefren
a7449c28c6 add MPLS clue - mpls and tag keywords 2010-06-26 14:29:36 +00:00
pooka
5d8421fd1d naughty naughty, don't peek into src/sys 2010-06-14 14:42:49 +00:00
riz
b82a6579fe Remove _PATH_NOLOGIN before reboot, as well as before exit(), to prevent
a root file system which has been marked read-only in fstab from continuing
to prevent logins after reboot.  From Ian D. Leroux in PR#43390.
2010-06-09 04:51:53 +00:00
dholland
0bf3480c62 Change getnum() to use intmax_t instead of int, so it doesn't overflow
between 2^31 and 2^32. Adjust call sites accordingly. PR 43354.
2010-05-28 07:40:53 +00:00
pooka
d4af2513b1 PUFFSDEVELVERS is a goner 2010-05-21 11:59:38 +00:00
wiz
8d31c36840 Mention that dkctl(8) does not modify on-disk data, and add xrefs to
fdisk(8) and gpt(8). Bump date.
2010-05-18 23:33:03 +00:00
jruoho
04636eae18 Use a list for the list of bugs. 2010-05-14 05:04:58 +00:00
tnozaki
50eb6aadde cast isblank(3)'s argument to unsigned char. 2010-05-13 17:52:11 +00:00
mbalmer
8e64e5f559 Fix grammar in a line of output.
From Hywel Mallett via FreeBSD.
2010-05-12 21:21:59 +00:00
kefren
c890d3f5e0 Update also keywords.{c,h} generator in order to reflect latest changes. 2010-05-12 19:26:33 +00:00
christos
c69676936c PR/40455: Mihai Chelaru: Add noreject noblackhole options 2010-05-12 17:56:13 +00:00
plunky
a5a749a5f7 C99 says that offsetof() expands to a constant expresssion, so we
can't use variable array index in there. Do the calculation manually
for C99 compilers (pcc)
2010-04-20 21:25:25 +00:00
wiz
c4f8f360fc New sentence, new line. Sort SEE ALSO.
Improve formatting of option list.
2010-04-11 21:29:37 +00:00
hannken
738a97ca87 Add -x option which allows to run `fsck_msdos -n' on a snapshot of
a live file system.

While here modify snap_open() to accept a character device as its
first arg and remove now unneeded get_snap_device().

Reviewed by: Manuel Bouyer <bouyer@netbsd.org>
2010-04-11 08:23:51 +00:00
mrg
e00e7bd5c0 implement CTLTYPE_BOOL support. it was entirely missing. HI MATT! 2010-04-11 01:52:10 +00:00
wiz
d129d948ec Minor punctuation fixes, improve and sort SYNOPSIS, sort flag descriptions.
From Bug Hunting in PR 43130.
2010-04-07 09:40:58 +00:00
wiz
01ab0048e9 Sort option descriptions, per PR 43119 by Bug Hunting.
Refer to -r from -w.
Bump date.
2010-04-05 18:08:41 +00:00
plunky
ba9e7b8487 use -Wno-pointer-sign in the HAVE_PCC case also 2010-04-03 11:55:41 +00:00
christos
f8c6b14cc1 fix printf format. 2010-04-02 19:33:09 +00:00
christos
79bdd20aa6 PR/43105: Peter Kerwien: Destroying a GPT partition with dd will cause gpt
destroy / create to fail. When reading the GPT label from the end of the disk
ignore errors if the GPT label at the beginning of the disk was not found.
2010-04-02 13:36:59 +00:00
pooka
4ec51947cc convert to parseargs 2010-03-31 13:33:14 +00:00
pooka
3bc1bb4f0e initialize canon_dev 2010-03-31 13:10:10 +00:00
joerg
a26d6af163 Kill stray t. 2010-03-31 04:17:23 +00:00
joerg
44f960014f \\ -> \e 2010-03-30 14:26:55 +00:00
joerg
104dbdf3ec Assume o umlaut is transliterated by nroff as needed.
\\ -> \e
2010-03-30 14:07:50 +00:00
joerg
4a90fd399e \\ -> \e 2010-03-30 14:05:32 +00:00
pooka
23d5534a55 Avoid known unknown if the kernel presents us with an unknown
unknown for module class and/or source.

related to PR kern/43014
2010-03-19 16:25:33 +00:00
jld
9abd7e4959 Give a more polite message for raidctl -m on a non-parity RAID set. 2010-03-16 03:23:47 +00:00
mrg
a597c96c7d add SMART code 187: "Reported uncorrect". from smartmontools. 2010-03-13 19:49:50 +00:00