Commit Graph

5490 Commits

Author SHA1 Message Date
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
plunky 858911baa2 fix sign-compare issue 2010-03-13 13:45:05 +00:00
jld 8ccd0f67a6 Exclude parity map regions that don't actually exist from the dirty region count
in `raidctl -m`.  Makes for less confusing output during `raidctl -i`.
2010-03-13 07:21:37 +00:00
christos 20ebd2a462 PR/42952: The Grey Wolf: Fix for "true incremental". Don't overload level
9, use a new level "i" which is logically 10.
2010-03-11 01:32:59 +00:00
abs 6c6ab6a995 Relegate edlabel to use in extremely memory constrained install
ramdisks and prefer disklabel elsewhere.
Based on discussion on affected port lists (port-sparc port-sparc64
port-sun3 port-sun2 port-atari port-mvme68k).
All listed ports plus amd64 test built after change
2010-03-10 23:13:09 +00:00
mlelstv bc76b1d5b0 When clearing a log on failure, not only ask the kernel to ignore an
existing log but to remove it on next mount.
2010-03-06 11:31:40 +00:00
christos c6af1de885 - use warn/err properly
- wrap long lines
2010-03-06 00:30:54 +00:00
pooka 04e9fbfc62 Remove no longer used -DNFS. 2010-03-05 19:53:37 +00:00
pooka 696ffdd08a note module changes 2010-03-05 18:51:22 +00:00
pooka 0299287e5f Use 8k buffer, since 4k is too short for the default list (might
save one round of modctl()).
2010-03-05 10:27:16 +00:00
wiz f704e3fc5c -i does not take an argument. Remove unnecessary Bk/Ek. New sentence, new line. 2010-02-26 07:01:17 +00:00
christos c40eb1e731 PR/42883: Greywolf: Add -i flag which brings "true incremental" capability. 2010-02-26 02:11:40 +00:00
tsutsui 5b900f2697 Avoid line break in `Linux Ext2' strings. 2010-02-25 13:09:17 +00:00
hannken 626b19f88a Dont pass option -x down to fsck_xxxfs.
Hi christos ...
2010-02-24 13:56:07 +00:00
tsutsui 62936fc84a 32 bit UID and GID support on ext2fs has been added since 5.0
so remove description about the limitations from BUGS section.
2010-02-22 09:45:02 +00:00
mlelstv d3dff438aa dev_bsize wasn't initialized. The actual value doesn't matter since
the same value is used to compute byte offsets into the special file
but a value of zero causes a division by zero.
2010-02-21 16:24:21 +00:00
wiz 1a64f4201c Call the file system "ext2" consistently. Suggested by tsutsui. 2010-02-21 13:26:45 +00:00
wiz dcced1277c Fix string, noted by tsutsui. 2010-02-21 13:23:15 +00:00
ahoka daea46045b Fix two problems with argc handling in bioctl(8), which makes
bioctl(8) dump core if expected arguments are not passed in.

Closes PR bin/39946 (patch by Juan RP).
2010-02-20 22:25:54 +00:00
mlelstv 6ae5a6ad41 Initialize device_name before opendisk to avoid
"unable to open device '(null)'" error messages
when the opendisk fails.
2010-02-20 08:47:10 +00:00
wiz 8f657e21de Fix typo (specifed -> specified). 2010-02-18 14:00:39 +00:00
wiz 40effc38c9 Pull over some of Jason McIntyre's fixes for newfs_ext2fs.
Suggested by tsutsui.
2010-02-18 13:51:45 +00:00
wiz 380455a930 Fix pasto noted by tsutsui. 2010-02-18 13:49:19 +00:00
wiz e386b4ea79 Use Dq for double quotes; remove trailing whitespace. 2010-02-18 06:57:17 +00:00
christos 639f597520 Add -x <mountpoint> ``exclude'' option. 2010-02-17 23:30:21 +00:00
wiz 841db612d9 Various fixes from Jason McIntyre <jmc@kerhand.co.uk>. 2010-02-17 21:39:14 +00:00
mlelstv 7974872552 Three changes in a single commit.
- drop the notion of frags (LFS fragments) vs fsb (FFS fragments)
  The code uses a complicated unity function that just makes the
  code difficult to understand.

- support larger sector sizes. Fix disk address computations
  to use DEV_BSIZE in the kernel as required by device drivers
  and to use sector sizes in userland.

- Fix several locking bugs in lfs_bio.c and lfs_subr.c.
2010-02-16 23:20:30 +00:00
plunky f5c86c146d use
.if defined(HAVE_GCC) && ${HAVE_GCC} == 4

rather than

.if ${HAVE_GCC} == 4

as HAVE_GCC may be undefined
2010-02-08 07:56:06 +00:00
christos c68c36a514 Centralize time printing and deal with ctime possibly returning NULL. 2010-02-04 23:55:42 +00:00
roy 98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
mlelstv 0aef69272b Skip handling of APPLEUFS_LABEL if it is smaller than a device block.
In particular:

- newfs will not try to erase the label
- fsck_ffs will not try to validate the label

This lets newfs and fsck work on 2048-byte-per-sector media.

Does Apple UFS support such media and how?
2010-01-31 16:04:34 +00:00
is c41a4b460e Use getnameinfo() for printing AppleTalk addresses. While here, fix
printing of broadcast for this address family (AT broadcast is fixed
node 255 on the local net).
2010-01-30 18:30:33 +00:00
drochner 821d4396bd follow KS_GROUP_Ascii->KS_GROUP_Plain rename in kernel,
noticed by Andreas Gustafsson
2010-01-29 09:49:34 +00:00
christos 13a5940614 use warn/err appropriately. 2010-01-27 18:34:02 +00:00
pooka 03fdf6b025 error message: \n\n -> \n 2010-01-27 17:02:06 +00:00
spz 1cb24f3feb range-check what we assign to int cachebufs from calculations with
uint64_t usermem. This only becomes relevant if you have several TB of RAM.
Promoting cachebufs to uint64_t is not necessary as it gets limited to
(currently) 512 anyway.

fixes the last issue of PR: 19852
2010-01-27 12:20:25 +00:00
wiz e08d841a54 + Fatal errors due to uninitialized components are ignored.
for -C. For dillo@
2010-01-27 09:26:16 +00:00
wiz 4421a69224 Consistently use "START disks" in examples. Bump date. 2010-01-27 08:56:08 +00:00