Commit Graph

4663 Commits

Author SHA1 Message Date
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
cbiere 551466a6e7 Avoid crash if the filename contains no digits. 2007-01-21 20:45:41 +00:00
isaki d4ba865188 Make it compile without SUPPORT_UTMP nor SUPPORT_UTMPX. 2007-01-20 13:25:28 +00:00
hubertf df06563bc3 Remove more duplicate #includes,
from Slava Semushin <slava.semushin@gmail.com>
2007-01-17 21:59:49 +00:00
reinoud 3434329686 Add `-o noatime' support to the mount program. Not relevant for the
read-only implementation currently committed though.
2007-01-17 21:21:12 +00:00
dyoung 3dfd6a1c5f Print more 802.11 statistics when the operator runs 'ifconfig -v
ath0', for example.  Fix the spelling of one statistic.
2007-01-09 09:25:56 +00:00
dyoung dbf49243d9 Per discussion "ifconfig error handling" on tech-net@ in August
2006, if we fail to set any 802.11 parameter, exit immediately with
EXIT_FAILURE.
2007-01-09 09:24:14 +00:00
dyoung d097d6a596 Let us adjust the 802.11 fragmentation threshold with ifconfig ath0
frag 256, for example.
2007-01-09 09:19:02 +00:00
wiz fbe3512d50 Bump date for previous. 2007-01-08 07:22:12 +00:00
isaki 577b5df548 Sync with reality. The default timeout is 1200 sec. 2007-01-07 08:53:04 +00:00
elad 9b470b7708 Mention potential reasons for EPERM.
Requested by Anon Ymous.
2007-01-06 14:43:27 +00:00
jmmv 08d2474c3c s/tons/lots/, per simonb@'s suggestion. This looks more formal. 2007-01-03 08:39:29 +00:00
yamt dae26da41f remove the rest of Kerberos 4 code. 2006-12-27 12:43:10 +00:00
yamt bb0e3db15a sync with header changes. (nqnfs removal) 2006-12-27 12:13:55 +00:00
wiz 211f17ad46 Sort options in usage. 2006-12-27 11:28:59 +00:00
wiz 78cc844673 Sort options. 2006-12-27 11:27:37 +00:00
yamt b9625c8fbe oops, remove duplicated -D. 2006-12-27 11:08:30 +00:00
yamt 580a1898fe revive -D option because it actually has some meanings for non-nqnfs mounts. 2006-12-27 11:05:04 +00:00
wiz 856416cc4a Punctuation nit, sort SEE ALSO. 2006-12-23 07:41:26 +00:00
elad aede3e59fc PR/35304: C J Coleman: Off-by-one nul byte overwrite in mode_bits routine
of sbin/sysctl
2006-12-21 22:25:39 +00:00
wiz b60285f6d5 Nicer macro usage. 2006-12-19 20:33:35 +00:00
jmmv 320a6bcfea Note that meta data is stored in non-pageable memory and the problems this
may carry.  Suggested by Greg Troxel in private mail.
2006-12-19 14:50:49 +00:00
christos 8539ad5cf5 from Anon Ymous: remove (void)&var; 2006-12-18 20:08:48 +00:00
christos 746c5b06eb Convert a couple of "(void)&" constructs to volatile.
Flag various unused parameters in restore and dump so that these will
compile with -Wextra.  (Note: restore uses some stuff from dump.)
2006-12-18 20:07:32 +00:00
nonaka 5637a5d46a zaurus use MBR partition info. 2006-12-18 13:39:10 +00:00
christos b311ec9d52 Exit with non-zero on errors. 2006-12-18 12:50:08 +00:00
reed 09fde137ce Mention pfil(9). Reword slightly for "ipf" option as filters IPv6
also (and ICMP is implied) and that other types are blocked.

Point to pf(4) and pfil man pages.

Based on discussion in January 2006 on tech-kern.  (This has been
in my tree for around 11 months.)

This part of my work to change this (and related to use) pfil (instead
of ipf). That is done back then but needs some testing.
2006-12-14 02:50:12 +00:00
christos df99a4dd43 Sprinkle volatile, instead of using the (void)&foo; which does not work on
gcc 4.
2006-12-13 16:08:26 +00:00
elad 031bd982f9 Don't reset entry-type for every flag_spec. 2006-12-08 23:22:19 +00:00
pavel edab74570a Move the description of sysctl MIBs from sysctl.3 to a new manual page
sysctl.7. Remove the list of MIBs from sysctl.8 so we don't have to
maintain duplicate information, as proposed by YAMAMOTO Takashi on
tech-userlevel. Also remove references to header files from sysctl.8.

The numeric constants remain documented, they are still needed in some
cases. See the discussion on tech-userlevel. ("mib list in sysctl.8")

OK by YAMAMOTO Takashi.
2006-12-04 08:59:13 +00:00
wiz 11b2ef8137 Remove a troff command that added some empty lines to the man(1) output. 2006-12-03 11:35:07 +00:00
tls e1231b8650 Prompt before rolling forward, in interactive mode, so it's possible to fix
the filesystem but not roll forward possibly unwanted changes.
2006-12-01 06:38:39 +00:00
elad 95513f79fe Support escaping characters in the path so that spaces etc. are allowed
in entries for Veriexec.

This has been requested for a long time, most recently by Brad Harder.

Thanks a lot to Michael van Elst for the patch, done during the latest
hackathon.
2006-11-29 14:28:30 +00:00
elad 6b6dc6a617 Type changed from size_t to uint64_t, adjust format string.
Pointed out by Tom Spindler, thanks!
2006-11-29 01:12:00 +00:00
elad 646f2112d3 Make Veriexec use proplib(3) for kernel-userland data passing.
Obviously, this breaks the already unstable Veriexec ABI, but that's
it. Some cool additions are planned to be introduced, and this just
makes it so that NetBSD 4.0 users will be able to easily use them as
well.

This also removes the fingerprint type name limit, so relevant code
was adjusted.

Thoroughly tested (even uncovered a bug in proplib! thanks for fixing
that cube@!). Documentation updated.
2006-11-28 22:22:02 +00:00
jmmv 91af0d68b1 Add a '-l' flag and a 'L' command to interactive mode to list all known
file system types.  (Similar to what fdisk does for partition types.)

Closes PR bin/12954.
2006-11-26 16:16:31 +00:00
christos df031f1edc PR/34837: Mindaguas: Add SysV SHM dynamic reallocation and locking to the
physical memory
2006-11-25 21:40:04 +00:00
christos f5b5006944 PR/28884: Izumi Tsutsui: mount_mfs(8) doesn't set default fssize if "swap" is
specified
2006-11-25 18:18:22 +00:00
dsl 26ad77c3e1 Report the last sector number of a partition, instead of that of the first
of the next - with appropriate discarding of the head/sector values
if the partition is cylinder aligned.
Fixes PR 26921
2006-11-25 16:10:32 +00:00
scw 258fa36dc2 Don't use negative offsets from "bpb.bps" when writing out values such
as DOSMAGIC in the MBR. In non-512 byte media, the MBR is still 512
bytes in length.

Based on the patches provided in PR kern/17398 by Trevin Beattie.
2006-11-25 12:29:33 +00:00
christos 1665d5e960 fix spelling of accommodate; from Zapher. 2006-11-24 19:46:58 +00:00
yamt 809ec70bcf implement ipv6 TSO.
partly from Matthias Scheler.  tested by him.
2006-11-23 19:41:58 +00:00
elad a84fee7faf Initial implementation of PaX Segvguard (this is still work-in-progress,
it's just to get it out of my local tree).
2006-11-22 02:02:51 +00:00
elad 0ba2154297 Update my email address. 2006-11-21 00:22:04 +00:00
apb 324b3b8a78 Fix error in previous. Pass 1 needs to use progress_setrange(),
not progress_sethighlim().
2006-11-14 22:51:11 +00:00
apb f93df16b06 Improve the progress bar displayed by fsck_ffs -p -P.
The progress bar will now travel from 0 to 20% during pass 1, from 20%
to 95% during pass 2, and from 95% to 100% during passes 3, 4, and 5.
Previously, the progress bar was not displayed at all during pass 1,
slowly traveled from 0 to about 50% during pass 2, and then very rapidly
traveled from 50% to 100% during passes 3, 4, and 5.

Note that fsck_ffs is the only user of fsck/progress.{c,h}.
2006-11-14 21:01:46 +00:00
dyoung a25eaede91 Add a source-address selection policy mechanism to the kernel.
Also, add ioctls SIOCGIFADDRPREF/SIOCSIFADDRPREF to get/set preference
numbers for addresses.  Make ifconfig(8) set/display preference
numbers.

To activate source-address selection policies in your kernel, add
'options IPSELSRC' to your kernel configuration.

Miscellaneous changes in support of source-address selection:

        1 Factor out some common code, producing rt_replace_ifa().

        2 Abbreviate a for-loop with TAILQ_FOREACH().

        3 Add the predicates on IPv4 addresses IN_LINKLOCAL() and
          IN_PRIVATE(), that are true for link-local unicast
          (169.254/16) and RFC1918 private addresses, respectively.
          Add the predicate IN_ANY_LOCAL() that is true for link-local
          unicast and multicast.

        4 Add IPv4-specific interface attach/detach routines,
          in_domifattach and in_domifdetach, which build #ifdef
          IPSELSRC.

See in_getifa(9) for a more thorough description of source-address
selection policy.
2006-11-13 05:13:38 +00:00
apb e81d0de4e0 Fix a bug that caused 0.0.0.0/0 to be treated like 0.0.0.0/32.
foo << 32 is undefined per section 6.5.7 of the C99 standard
if foo is (or is promoted to) a 32-bit type.
2006-11-11 21:50:19 +00:00
jmmv 98f101bc9c tmpfs is not considered experimental any more. OK'ed by core@. 2006-11-11 19:01:30 +00:00
jmmv 2947e73b43 Move lfs_cleanerd from /usr/libexec to /libexec. This is to allow putting
the root file system on a LFS volume.

Addresses PR bin/30407.  No objections in tech-userlevel@.
2006-11-11 14:47:27 +00:00
christos 80955a4c43 replace varstack alloc with malloc. 2006-11-09 19:41:59 +00:00
christos b6479e9fff Fix malloc/realloc/calloc issues: always check and exit, use EEXIT instead
of 8.
2006-11-09 19:36:36 +00:00
yamt 442aa98fcd remove nqnfs support.
namely,
	- make -q a synonym of -3.
	- ignore -L and -D.
2006-11-09 10:07:00 +00:00
christos 9f4a7c8c31 PR/34965: Nicolas Joly: sysctl(1) small memory leak 2006-11-02 14:54:21 +00:00
christos 09012c9606 prefix name in kern.drivers 2006-11-01 22:26:36 +00:00
mjf a2be0ed655 Revert the changes I introduced trying to solve tmpfs' NFS export problem.
Requested by yamt@
2006-10-31 08:12:46 +00:00
christos 9e74871aa3 find rmd160.h 2006-10-30 01:21:53 +00:00
hannken fcd5ec4841 When using a snapshot take the snapshot raw device on further open.
Fixes PR #34923  dump(8) only dumps a corefile with -X (snapshots)

Approved by: Manuel Bouyer <bouyer@netbsd.org>
2006-10-26 20:02:30 +00:00
mjf 84bd46b9f9 Add support to allow a file system to not permit being exported over NFS.
Approved by elad@ and wrstuden@
2006-10-24 21:53:10 +00:00
mrg 7d429c305a use c99 initialisers. 2006-10-23 03:56:38 +00:00
christos 27ae1373d5 Mention include proper file for keyboard defines; from Zafer. 2006-10-22 19:39:32 +00:00
he 565d8259e3 Add initialization of a variable where gcc for some archs thinks
that it may be used un-initialized.  From cursory inspection it is
not obvious that gcc is wrong.
2006-10-17 21:14:03 +00:00
wiz 1a2477c1ae Serial comma. Add RCS Id. Remove superfluous quotes. 2006-10-17 09:32:34 +00:00