Commit Graph

4825 Commits

Author SHA1 Message Date
tsutsui 726acbb131 Use powerof2() macro in <sys/param.h> rather than a homegrown version. 2007-11-27 13:31:10 +00:00
xtraeme 90a0b7ad49 Mention evbarm/iopwdog(4) and swwdog(4). 2007-11-23 13:32:46 +00:00
xtraeme 9537f21760 Mention some watchdog drivers in SEE ALSO and don't mention envsys(4)
or envstat(8), they don't have nothing in common with watchdogs.

<wizd> Bump date.
2007-11-23 11:34:50 +00:00
tsutsui 58babb9c75 Roundup e2fs_ipg to make it use whole inode table blocks since
it's still reasonable and some kernel code seems to assume it
(otherwise some inode numbers of directories could be corrupted).

XXX: not sure if odd e2fs_ipg is valid or not in ext2fs spec.
2007-11-21 13:14:06 +00:00
tsutsui ddd9ad0a5e Fix e2fs_itpg calculation. 2007-11-20 16:34:37 +00:00
tsutsui e2cf99a49a - fix a possible integer overflow
- initialize inode generation numbers with random numbers for NFS
  like newfs(8) as man page said
  XXX: sys/ufs/ext2fs/ext2fs_alloc.c:ext2fs_valloc() seems to override
       these generated numbers.
2007-11-19 15:11:50 +00:00
apb 02c42d6bae Remove unwanted ">" from a printed message. 2007-11-18 19:19:00 +00:00
christos eb90df6853 From Marco Trillo (marcotrillo at gmail dot com):
Add Advanced power management in atactl(8)
2007-11-18 17:48:21 +00:00
tsutsui 67c9d310f8 Several minor fixes:
- replace a magic number with a macro
- fix several printf format
- fix possble block sizes for zap_old_sblock()
- use err(3) rather than errx(3) + strerror(errno)
- fix a typo
- misc cosmetics
2007-11-18 07:11:39 +00:00
tsutsui d047ce663b Descend into newfs_ext2fs(8). 2007-11-17 16:58:30 +00:00
tsutsui f8b02b9cdf Add a dumb but BSD-licensed newfs_ext2fs(8) command.
This is based on the newfs(8) command for ffs, but
most ext2fs specific part is written from scratch.

Tested on alpha, cobalt, i386 and sgimips with some disks and vnd(4),
and at least cobalt's firmware can load boot files from an ext2fs
E2FS_REV0 partition created by this native newfs_ext2fs(8) command.

Closes PR bin/16175.
2007-11-17 16:50:25 +00:00
tsutsui 1e795b0373 Add a workaround for incorrect "SUMMARY INFORMATIONS WRONG FOR CG #N"
and "BLK(S) MISSING IN BIT MAP #N" reports on newer ext2fs with
EXT2F_COMPAT_RESIZE feature by accounting blocks in EXT2_RESIZEINO.

XXX1: Should we account blocks allocated by all other reserved inodes?
XXX2: We should really check and fix EXT2_RESIZEINO accordingly.
2007-11-16 16:55:04 +00:00
tsutsui 672990c37a Fix e2fs_itpg calculation (a rounddown bug). 2007-11-13 17:25:43 +00:00
tsutsui 98bd33ec69 Use more proper aligned format in a debug function print_bmap(). 2007-11-13 13:57:52 +00:00
pooka 3384f1f26e tyop: _time_seconf -> _time_second 2007-11-12 16:04:55 +00:00
christos f4f95f573f simplify and fix the combination code. Hi pooka. 2007-11-11 22:44:12 +00:00
yamt f72b283e28 - fix timeout for -s.
- mention default values of some options.
2007-11-09 12:25:00 +00:00
martin 4babfd8202 size_t != unsigned int - so don't pass the address of the former when a
pointer to the latter is expected.
2007-11-06 10:48:39 +00:00
martin 309213c31a Do not use %d for size_t 2007-11-06 10:44:23 +00:00
christos ad18d2e41e 3 month roland feedback timeout:
- Pass lint
- knf
- convert ints to size_t's
2007-11-06 02:50:48 +00:00
xtraeme d3f615b78d - Remove the code for softraid, it's unlikely that NetBSD will support
this because we do have a working raidframe(4).
- Miscellaneous cleanups and make the code WARNS=4 compliant.
- Removed all stuff that doesn't apply to NetBSD.
2007-11-04 08:25:04 +00:00
xtraeme 51f434b0bb Fix typo in SATA features: Perservation -> Preservation. 2007-11-04 02:34:27 +00:00
tsutsui b682074ae4 Don't print Drive serial number if -S (setting shell variables) is specified. 2007-10-28 10:02:08 +00:00
ad 7dad9f7391 Merge from vmlocking:
- Split vnode::v_flag into three fields, depending on field locking.
- simple_lock -> kmutex in a few places.
- Fix some simple locking problems.
2007-10-10 20:42:20 +00:00
ad 0e7216ebf1 brelse() now takes two args. 2007-10-08 21:42:33 +00:00
ad fe44973fe3 Give brelse() a second argument so that it matches the kernel.
fsck_lfs now compiles again.
2007-10-08 21:39:49 +00:00
xtraeme 8b2678bd7e Use a two clause license for all the code I contributed.
The envsys code will be changed later.
2007-10-06 07:21:02 +00:00
xtraeme 9ab6815f21 Remove intval from %union, it's unused... ok christos@. 2007-10-01 17:01:55 +00:00
ragge b531488dbc __attribute -> __attribute__. 2007-09-16 18:42:02 +00:00
ragge 9949926272 __attribute -> __attribute__. 2007-09-15 14:35:33 +00:00
wiz f4a91b1899 Fix Dd argument (use full month names).
Use more markup.
Comment out references to safte(4) and softraid(4), which don't exist in
NetBSD.
Remove trailing whitespace.
Use macros instead of characters for HTML output (replace ">", "<"
with \*[Gt], \*[Lt]).
Sort sections.
2007-09-09 16:13:19 +00:00
bouyer 23448a2818 Fix typo. 2007-09-09 13:30:55 +00:00
xtraeme a0b933c5b2 CID 4498: print_entry() returning without freeing 'fp'.
Ok by rmind@.
2007-09-06 03:01:55 +00:00
tls ae75a5cdbe This program is a host tool, so when we use newfangled C features like
PRIxyz we have to ensure it still builds on hosts with Old compilers.
Noticed while building a cross-toolchain on FreeBSD 4.
2007-09-04 00:34:58 +00:00
christos 7bf1a6f81d Avoid zero-divides from Anon Ymous 2007-08-22 16:30:28 +00:00
bouyer bd627359dd Improved SATA support, from Jonathan A. Kollasch in PR bin/36772:
* use full 5-bit command queue depth that SATA supports
* decode SATA bits
2007-08-21 16:53:18 +00:00
pavel 5e809e89c6 Attempt at fixing build failures after proplib was converted to bool:
FALSE -> false, TRUE -> true, boolean_t -> bool, int -> bool when
appropriate, include stdbool.h . proplib.h no longer provides boolean_t,
so it is necessary to change to bool.

From Tom Spindler (dogcow@).
2007-08-17 17:59:15 +00:00
dyoung 4287175475 Don't nul-terminate the interface name in a sockaddr_dl that is
part of an ifa_msghdr returned by sysctl(3), because that could
overwrite the ifam_len field of the following ifa_msgher.  Instead,
copy the interface name out of the sockaddr_dl, and then nul-terminate.
Fixes the bug reported by Frank Kardel on current-users@.  Thanks
Frank for reporting, and for testing the fix.
2007-08-14 03:39:19 +00:00
oster 761dfd3017 Talk a bit more about how the size of a RAID set is determined, and
of RF_PROTECTED_SECTORS.  Requested by (and with comments from and
thanks to) Christoph (bad@).
2007-08-06 19:44:16 +00:00
yamt 3c955ef258 lengthen timeout. i saw a server for which 10s was not enough. 2007-08-05 22:09:12 +00:00
pooka ba8a93da5b typographical fixes
from Matthew Wala in misc/36729
2007-08-04 10:45:36 +00:00
he 844b7f67f9 Re-phrase description of -A option, as per suggestion from Jukka Salmi
at netbsd-users@ and with a slight tweak by myself -- at the end the last
dump device will remain as the single active dump device.
Fix a nearby typo.
Bump date.
2007-08-02 18:53:46 +00:00
pooka fee6f866be Don't re-explain vfs.generic.usermount & friends here. 2007-08-01 08:52:07 +00:00
pooka 16170d27f6 Explain that nosuid,nodev is also needed for non-privileged mounts. 2007-08-01 08:51:24 +00:00
rumble 331f3b4b63 Rescue the subjunctive. 2007-07-30 05:00:55 +00:00
christos 7f593965ea cast sizeof() to int for printf widths. 2007-07-17 23:56:01 +00:00
christos 27e0d2b78b kill MFSNAMELEN 2007-07-17 20:17:52 +00:00
christos a6e0a40b9f kill MFSTYPENAME 2007-07-17 20:13:43 +00:00
christos fede0a77fc kill MFSNAMELEN 2007-07-17 20:03:10 +00:00
pooka 91896524c2 Don't attempt to start megamaid if run with MNT_GETARGS. 2007-07-17 12:39:24 +00:00
pooka 63d872ecae Print MNT_GETARGS results in one line to make them display
properly with mount -vvvvvvvvvv
2007-07-16 17:12:03 +00:00
pooka 8f211a8a19 kernfs doesn't support getargs, so fail silently instead of making
a fuss about it.
2007-07-16 17:09:42 +00:00
pooka 704e075311 Make all mount(2) return value error checks against -1. Some file
systems just checked != 0, breaking MNT_GETARGS.  Others worked with < 0,
but make them check against -1 too for consistency.  And sprinkle some
stylish line wrapping where appropriate.
2007-07-16 17:06:52 +00:00
dsl 7af7206539 Add additional 'sizeof args' parameter to mount(2). 2007-07-14 15:57:24 +00:00
jnemeth 2f4c83c097 PR/36626 - Jukka Salmi -- fails to compile if DEBUG is defined 2007-07-10 23:50:35 +00:00
bouyer a59a9ef8db writeat() also expect offsets in DEV_BSIZE unit. This and the previous commit
should fix PR bin/35560. Thanks to Michael L. Hitch for pointing me at the
PR.
2007-07-08 16:54:40 +00:00
dsl df1814f734 Use block minor (from device name) for block devices (not char minor).
Fixes PR bin/36614
2007-07-07 20:11:07 +00:00
bouyer 2d9d4664a8 readat() expects the offset in DEV_BSIZE units. This made resize_ffs find the
filesystem on a vnd partition for me. It did grow the filesystem, and after
a fsck -f on the partition to fix a few superblock inconsistencies, all
looks good.
2007-07-05 21:38:20 +00:00
dsl 4c11bfb2e9 Preserve the mbr 'driver serial number' when copying in the netbsd
mbr code.  Should leave windows vista bootable.
Print the dsn from the mbr, not each pbr.
2007-07-05 20:30:29 +00:00
pooka 01d79aae7e The kernel socket isn't used by any of the providers, and it's a bit
hard to imagine how it could be used, so get rid of it.
2007-07-02 18:07:44 +00:00
pooka 703c0341d4 basesrc is no more 2007-07-02 16:56:37 +00:00
pooka 6ff8a42783 * narrow-angle const spray
* make config read return an error if it can't read the config file
2007-07-02 16:33:05 +00:00
rumble e222f53360 When checking for an EFS filesystem just read in the whole superblock,
rather than jump to the hard-coded magic field offset.
2007-06-30 02:05:27 +00:00
rumble 8600ed2bd8 Make mount_efs.8 and svhlabel.8 reference one another. 2007-06-30 01:11:35 +00:00
rumble dd5b82c6a6 Add missing include. 2007-06-30 00:54:09 +00:00
rumble 98a859360f Superblock magic numbers are #define'd, so use them. 2007-06-29 23:33:05 +00:00
rumble 6912898dc8 Add read-only support for SGI's Extent File System.
Reviewed by pooka@.
2007-06-29 23:30:16 +00:00
rumble 688ef4d823 Nuke extra comma in Xrefs. 2007-06-25 00:41:50 +00:00
dyoung e62dac44ae Produce more useful error messages. 2007-06-11 04:22:00 +00:00
dyoung 6f3106eba2 Let the operator use the DISKLABELSECTOR and DISKLABELOFFSET
environment variables to override the sector number, and the
bytes-offset in the sector, where disklabel(8) writes a disklabel.

If disklabel(8) was compiled as a host tool, then the defaults
still come from the port's LABELOFFSET and LABELSECTOR #defines.
Otherwise, the defaults still come from the sysctls, kern.labelsector
and kern.labeloffset.

This change helps me create a bootable CompactFlash image with both
a Master Boot Record (MBR) and a BSD disklabel for the RouterBOARD
153.  The RB 153 is an evbmips board with a CompactFlash slot.  It
searches the MBR on a CompactFlash card for a partition containing
an ELF kernel.  When disklabel(8) is built for evbmips, it will
ordinarily overwrite an MBR with the BSD disklabel.
2007-06-05 21:48:46 +00:00
mishka d7d886db87 Our VLAN implementation (as it correctly expected) is not allowed
to modify the whole VLAN tags, but it is permitted to change 12-bit
VLAN identificators only. Reflect this fact on the appropriate man
pages.

Antti Kantee and Mihai Chelaru from #netbsd-code were helpful in
better understanding of VLAN stuff. Thank you!
2007-06-05 11:15:15 +00:00
uwe 7a2d8df57b Document that reboot(8) passes any arguments to reboot(2) as bootstr. 2007-06-03 22:39:47 +00:00
ginsbach 3d6fea5a84 Add arguments to option descriptions for options that require arguments.
Document all of the NFS specific -o options.
2007-06-01 17:43:19 +00:00
tls 4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
jnemeth c0e06197a8 Add a caveat about reboot(8) not running shutdown scripts. This addresses
(at least partially) PR/35067 by Blair Sadewitz.
2007-05-24 23:19:43 +00:00
wiz a115c64dc7 Plural fix. 2007-05-20 22:27:46 +00:00
wiz 36f6e8095a Sort options. Bump date. 2007-05-19 14:23:25 +00:00
wiz febfcb5f7e Fill in AUTHORS section. Bump date. 2007-05-19 14:21:36 +00:00
christos 885f3f0a50 Only eat the - if argv[0] starts with a - 2007-05-17 00:32:01 +00:00
oster 9a9131c20f Add missing #include <sys/ioctl.h> to make this build without warnings. 2007-05-15 22:01:19 +00:00
elad 6700cfccd6 Some Veriexec stuff that's been rotting in my tree for months.
Bug fixes:
  - Fix crash reported by Scott Ellis on current-users@.

  - Fix race conditions in enforcing the Veriexec rename and remove
    policies. These are NOT security issues.

  - Fix memory leak in rename handling when overwriting a monitored
    file.

  - Fix table deletion logic.

  - Don't prevent query requests if not in learning mode.


KPI updates:
  - fileassoc_table_run() now takes a cookie to pass to the callback.

  - veriexec_table_add() was removed, it is now done internally. As a
    result, there's no longer a need for VERIEXEC_TABLESIZE.

  - veriexec_report() was removed, it is now internal.

  - Perform sanity checks on the entry type, and enforce default type
    in veriexec_file_add() rather than in veriexecctl.

  - Add veriexec_flush(), used to delete all Veriexec tables, and
    veriexec_dump(), used to fill an array with all Veriexec entries.


New features:
  - Add a '-k' flag to veriexecctl, to keep the filenames in the kernel
    database. This allows Veriexec to produce slightly more accurate
    logs under certain circumstances. In the future, this can be either
    replaced by vnode->pathname translation, or combined with it.

  - Add a VERIEXEC_DUMP ioctl, to dump the entire Veriexec database.
    This can be used to recover a database if the file was lost.
    Example usage:

        # veriexecctl dump > /etc/signatures

    Note that only entries with the filename kept (that is, were loaded
    with the '-k' flag) will be dumped.

    Idea from Brett Lymn.

  - Add a VERIEXEC_FLUSH ioctl, to delete all Veriexec entries. Sample
    usage:

        # veriexecctl flush

  - Add a 'veriexec_flags' rc(8) variable, and make its default have
    the '-k' flag. On systems using the default signatures file
    (generaetd from running 'veriexecgen' with no arguments), this will
    use additional 32kb of kernel memory on average.

  - Add a '-e' flag to veriexecctl, to evaluate the fingerprint during
    load. This is done automatically for files marked as 'untrusted'.


Misc. stuff:
  - The code for veriexecctl was massively simplified as a result of
    eliminating the need for VERIEXEC_TABLESIZE, and now uses a single
    pass of the signatures file, making the loading somewhat faster.

  - Lots of minor fixes found using the (still under development)
    Veriexec regression testsuite.

  - Some of the messages Veriexec prints were improved.

  - Various documentation fixes.


All relevant man-pages were updated to reflect the above changes.

Binary compatibility with existing veriexecctl binaries is maintained.
2007-05-15 19:47:43 +00:00
xtraeme 04ae3cd1d0 Remove an extra comma. 2007-05-07 11:02:21 +00:00
xtraeme 598409109e Add -b flag into usage(). 2007-05-01 21:43:37 +00:00
xtraeme b83d27bc99 Bump date. 2007-05-01 21:41:52 +00:00
perseant faaef229b4 Add a "-b" option to search a partition for valid alternate superblocks,
rather than searching the disk for partitions.  Also, test LFS superblock
checksums before we report them.
2007-05-01 21:28:50 +00:00
bouyer 982bad256f Add bio(4) and associated bioctl(8) from OpenBSD, a driver control block
device controllers, and more specifically raid controllers.
Add a new sensor type, ENVSYS_DRIVE, to report drive status. From OpenBSD.
Add bio and sysmon support to mfi(4). This allow userland to query
status for drives and logical volumes attached to a mfi(4) controller. While
there fix some debug printfs in mfi so they compile.
Add bio(4) to amd64 and i386 GENERIC.
2007-05-01 17:18:52 +00:00
tron 04dc8ab30b Bump date because of last change. 2007-04-30 12:33:13 +00:00
tron 962652c0b2 Improve example of restoring a complete filesystem with "restore -r":
- NetBSD's "newfs" doesn't accept a second (non-option) argument.
  Patch provided by Jeff Ito in PR bin/36241.
- Use "sd0" instead of "rp0" because NetBSD's doesnt have a disk driver
  called "rp".
- Use "/dev/rst0" instead of "/dev/rst8". With NetBSD's device numbering
  scheme a system would have to have 9 tape drives to get "/dev/rst8".
2007-04-30 12:32:35 +00:00
christos cedd1a800a PR/36229: Geoff Wing: uninitialized dkwedge_info structure in mount_mfs
causes random failures
2007-04-28 02:56:32 +00:00
christos 7731d9378a PR/36223: Milos Negovanovic: Don't ask if we want to install mbr_bootselect
with -f.
2007-04-26 18:51:00 +00:00
matt 1863ad163e Remove defunct B from getopt string. 2007-04-12 18:41:23 +00:00
chs cb9ef1cfbd apply revision 1.31 yet again:
"make sure that we don't try to allocate negative memory when blks == 0."
or on amd64, "make sure that we don't allocate 32 GB when blks == 0."
2007-04-12 05:19:18 +00:00
pooka 46bc932103 whooops, bump date also 2007-04-05 21:31:44 +00:00
pooka 278c207505 /proc/devices, not /proc/device 2007-04-05 21:30:16 +00:00
dyoung 5630b5969e Don't try to convert numbers to names for either endpoint of a
tunnel.  In this way, ifconfig will avoid emitting something
abominable like this:

        tunnel 192.168.1.1,mdns --> 192.168.1.2,kazaa
2007-03-26 05:02:44 +00:00
hubertf 47665376cc backout previous. 2007-03-24 00:17:34 +00:00
hubertf 137520cdea Call the pivot root by it's name. 2007-03-23 16:42:27 +00:00
dillo 77409ce510 Bump date for previous. 2007-03-22 21:29:33 +00:00
dillo 2e201492a9 Remove offset argument, no longer needed. 2007-03-22 13:31:05 +00:00
dyoung 7663f13790 KNF. 2007-03-21 03:51:30 +00:00
gdt 9da1e4cf5f Change mismatch of bytes 11 to 90 to be a warning, not an error, and
print out the values of the bytes that do not match.
Add comment explaining that there is no documented rationale for the
check.

fsck_msdos checks that several bytes are equal in the primary and
backup bootblock.  There is no documented rationale.  The kernel does
not enforce this when mounting a filesystem.  I have a FAT32
filesystem on my disk (mounted as /share) which fails this check, but
is accepted by both Windows XP and NetBSD.  My volume differs in bytes
71-81.  The primary contains "SHARE " and the backup NUL bytes.

Further, fsck_msdos does not have code to repair the mismatch.  As a
result such filesystems can be used not checked.
2007-03-19 18:30:40 +00:00
christos 8a56ee5512 - sprinkle static
- pass WARNS=4 and lint
- use size_t/time_t where appropriate
- get/setprogname()
- before executing rc.shutdown, set the real user id to 0, because shutdown
  scripts may depend on it (for example su depends on being root).
- use warn instead of perror, and make sure we use the right errno.
2007-03-14 03:52:28 +00:00
apb 7c0e506d3c Adapt to the new MAKEDEV interpretation of -M by passing -MM.
Also pass "-ppax" in an attempt to get improved performance,
but this doesn't really work in the typical case, because the
install ramdisk image contains a version of pax(1) that doesn't
support the -M flag.  (MAKEDEV detects the failure and falls back
to using mknod(8) as usual.)
2007-03-11 19:02:04 +00:00
apb 41bcdc8c57 Bump date for previous. 2007-03-11 10:51:03 +00:00
christos 20d50f44a1 drvctl 4 does not exist. 2007-03-10 20:32:26 +00:00
apb 4713b815f3 WARNS= 4 2007-03-10 18:22:04 +00:00
apb 7a268741a3 Document the new checks for whether a PBR is bootable.
Also add more detail in the introduction, and a few
more references.
2007-03-10 14:19:46 +00:00
apb 4c9d64d78e Try to check whether each partition is bootable. If not,
always print an error message.  If bootable and -v flag was
specified, print a success message.  If -v flag was specified
more than once, also try to decode more information from
the PBR.

Input from dsl and bad.
2007-03-10 14:18:28 +00:00
hubertf 7ce5824ba3 Remove unused ctype.h
From: Slava Semushin <php-coder@altlinux.ru>
2007-03-10 01:16:17 +00:00
hubertf d8a2863966 - removes unused ctype.h header
- correct comment in mount_nfs/getnfsargs.c: s/Nead/Need/

From: Slava Semushin <php-coder@altlinux.ru>
2007-03-10 00:30:36 +00:00
dillo d0c955805c Remove hfsp directories, they have been reimported as hfs. 2007-03-06 11:31:21 +00:00
dillo 56c3e41252 Complete rename of hfsp to hfs, requested by thorpej. 2007-03-06 11:28:44 +00:00
dillo be26016f83 Initial import of (experimental read-only) implementation of Apple
HFS+ file system.

Originally developed for Google Summer of Code 2005 by Yevgeny Binder,
updated and enhanced by me.
2007-03-06 11:21:58 +00:00
dillo 9274a5c0f1 Integrate apmlabel and HFS+ file system. 2007-03-05 23:18:01 +00:00
dillo eaf2e0be76 Utility to add Apple Partition Map partitions to disklabel, based
on mbrlabel.
2007-03-05 23:06:53 +00:00
dillo 9cf283f2a5 Initial import of (experimental read-only) implementation of Apple
HFS+ file system.

Originally developed for Google Summer of Code 2005 by Yevgeny Binder,
updated and enhanced by me.
2007-03-05 23:01:06 +00:00
dsl 19a3aab826 Update info about running MAKEDEV to note that MAKEDEV itself now creates
the mfs filesystem.
2007-03-03 07:54:15 +00:00
apb 1478a06a86 Remove all reference to MAKEDEV.subr. Add a reference to MAKEDEV.local. 2007-03-03 06:56:25 +00:00
simonb fbd2813869 No need to cast pointers to (char *) when passing to free(3). 2007-03-03 00:09:30 +00:00
dsl 1d350026de Instead of creating the mfs /dev here, get MAKEDEV to do it.
Removes a load of code that is easier done as a script.
Whenever init exits, use a different error number. Since it is difficult
for init to output messages when /dev/console is absent, having the exit
code reported by the kernel panic gives a chance of identifying the fault.
Also exit if MAKEDEV fails to create /dev/console.
2007-03-02 22:43:24 +00:00
wiz 73dcdfe648 Bump date for previous. 2007-03-02 20:46:23 +00:00
riz d8a62520d7 Use CPPFLAGS, not COPTS, and ${NETBSDSRCDIR}, not "../..". This
should fix OBJDIR builds. (Hi, martin!)
2007-03-02 04:03:17 +00:00
martin c6eb40af11 Add a tool to scan disks for BSD disklabels (might be from different
archs) and add wedges for them. Similar to the kernel options
DKWEDGE_AUTODISCOVER and DKWEDGE_METHOD_BSDLABEL, and actually reusing
most of that code.

This means, for example, you can plug a sparc64 disk into an i386, run
this tool and mount the partitions (provided your kernel has the FFS_EI
option).
2007-03-01 22:01:29 +00:00
apb c3bbc70fa0 When calculating the size of the MFS /dev file system, round file sizes
up to a multiple of 512.  (Not doing this before was wrong but probably
asymptomatic, because there was enough slack space to cope with the
error).
2007-03-01 18:25:58 +00:00
apb c654f7abce When creating /dev in a memory file system, include all three of
MAKEDEV, MAKEDEV.subr and MAKEDEV.local in the set of files that are
copied if they exist.

Now booting an INSTALL kernel with an embedded ramdisk correctly creates
/dev again, fixing a problem introduced when MAKEDEV.subr was created a
few days ago.
2007-03-01 07:18:07 +00:00
pooka be2ccdedfd proc/#/exe is now exposed for all mounts, move it away from linux-only 2007-02-24 15:45:43 +00:00
rumble 8f8bfb23ec Add a DIAGNOSTICS section and explain that the error message "could not
calibrate pkcs5_pbkdf2" could have resulted due to dynamic changes in cpu
clock frequency.
2007-02-23 20:00:04 +00:00
rumble 0a71191807 Cross-reference fsck_lfs and fsck_ext2fs. 2007-02-23 19:32:16 +00:00
hubertf 6eb43c8c6d TSEL() is const char* now 2007-02-18 01:48:37 +00:00
riz 16a0235c60 Use strtoll() when converting a 64-bit quantity. This makes "gpt add"
work with an offset of more than 2147483647 sectors.  While I'm here,
use strtoul() when converting an unsigned quantity.
2007-02-16 17:13:02 +00:00
xtraeme bebefe198b * There's no need to use an int to store the returned value of
ffs_checkver() and later use it in the switch statement, just
  use ffs_checkver.
* Remove unneded <sys/queue.h> header.
* Remove LFS from fstypes, it was never used.
* Increase SBCOUNT to 128, works faster.
* Remove unneded casts.
* (-F mode) close fd when the scan has finished or if pread() failed.
* (-F mode) print total size of file.
2007-02-16 01:32:21 +00:00
tron e3f6d993ed Increase the numbers of inodes available on the "/dev" MFS to 1280.
This should fix the "sysinst" problems caused by adding more devices
node to resolve PR port-amd64/35532.
2007-02-15 22:39:12 +00:00
hannken f67846b19f Add support for Solaris ufsdump volumes with more than 512*1024 inodes.
Here the bitmaps are written as

	CLRI or BITS with c_count <= 512
	ADDR* for the remaining blocks

Remove the bitmap handling from getfile(), remove xtrmap() and xtrmapskip().
Add new function getbitmap() modeled after getfile() that does bitmap
allocation, bitmap expansion and sets maxino.

Reviewed by: Manuel Bouyer <bouyer@netbsd.org>
2007-02-09 09:36:02 +00:00
drochner 628f1591c1 include <signal.h> where signal(3) is used 2007-02-08 21:36:58 +00:00
cbiere 033e1229b9 Revert previous commit. 2007-02-06 20:24:19 +00:00
cbiere a91470cccd Fixed format string in opendisk_werror() which was wrong since my previous
commit.
2007-02-06 14:04:01 +00:00
cbiere a63e176c73 * 1 -> EXIT_FAILURE.
* Replaced atoi() with parse_int().
 * Use an enum for ACTION_* instead of #define.
 * Use strdup() or asnprintf() instead of strlcpy() to avoid truncation.
 * pread() returns ssize_t not int.
 * Suppress "unused parameter" warnings.
 * verify_disklabel(): Pass the correct size to disklabel_scan().
 * verify_ffs():
   * Don't indicate success if pread() fails.
   * Check the amount of bytes read.
   * Don't cast buf to (struct fs *), it's not aligned.
 * eliminate_cores(): No need for a temporary variable.
2007-02-06 02:09:19 +00:00
cbiere 6d1dbd06cb Use warn() and warnx(). 2007-02-06 01:55:40 +00:00
cbiere 6065c2bb2b crypt_defaults_lookup():
* Avoid comparison of int with unsigned.
 * Simplified.
2007-02-06 00:51:09 +00:00
cbiere b90361afef memxor(): Fixed size_t/int mismatch. 2007-02-06 00:48:37 +00:00
cbiere 21f5afe6b9 * 0/1 -> EXIT_{SUCCESS,FAILURE}
* make_utmpx(): Added comment and slightly simpler construct.
 * alrm_handler(): Suppress "unused parameter" warning.
 * mapfile():
   * Handle st.st_size correctly.
   * Avoid unnecessary return statements.
   * Removed unnecessary MAP_FILE flag.
   * Use S_ISLNK() and check S_ISREG() too.
   * Add the terminating NUL rather after readlink() than
     before, just in case.
 * writefile():
   * Avoid unnecessary return statements.
 * read_ttys():
   * Check S_ISREG() as well.
   * Check for st.st_size > 0 rather than != 0.
2007-02-05 22:36:18 +00:00
njoly e2ca295958 Fix compilation on 64bit platforms.
ok by elad.
2007-02-05 15:37:20 +00:00
christos 847a4f4ee5 warns=4 2007-02-04 20:54:02 +00:00
christos 6a075814d9 - close the utmpx file.
- sprinkle void
- use size_t consistently.
2007-02-04 20:53:19 +00:00
wiz 4400332b14 Bump date for previous. 2007-02-02 07:28:03 +00:00
alc 340d62487a - sync file list with reality
- add a description for fd/# (with reference to fd(4))
2007-02-02 00:54:19 +00:00
perry a3b6213467 As pointed out by James Wetterau, we wish to complement, as in the
logical operation, rather than compliment, as in praise, the magic
number of the disk.

There are probably other instances of this in the tree. We should fix
them.
2007-01-27 19:20:28 +00:00
cbiere 140287a3de Replaced int_encode() with be32enc(). 2007-01-27 08:29:14 +00:00
wiz a0ab6bc85b Bump date for previous. 2007-01-23 20:34:17 +00:00
bouyer e47fe82adf Kimura Fuyuki, bin/35216: add a setspeed command, to set the highest speed
that the optical drive should use for reading data.
2007-01-22 20:56:46 +00:00