dragonfly.git
18 years agoFor now just use lwkt_gettoken() rather then a trytoken/gettoken combination.
Matthew Dillon [Wed, 13 Jul 2005 16:06:04 +0000 (16:06 +0000)]
For now just use lwkt_gettoken() rather then a trytoken/gettoken combination.
This is as part of an attempt to debug a potential issue with the objcache.

18 years agoCheck for a free-after-send case and panic if detected.
Matthew Dillon [Wed, 13 Jul 2005 16:04:00 +0000 (16:04 +0000)]
Check for a free-after-send case and panic if detected.

18 years agoDon't expand CCVER when testing for its definition.
Simon Schubert [Wed, 13 Jul 2005 15:26:21 +0000 (15:26 +0000)]
Don't expand CCVER when testing for its definition.

18 years agoUse src/share/mk to get a current sys.mk which defines LN.
Simon Schubert [Wed, 13 Jul 2005 15:25:32 +0000 (15:25 +0000)]
Use src/share/mk to get a current sys.mk which defines LN.

Reported-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Reminded-again-by: drhodus
18 years agoA lot of software depends on netinet/in.h being self-contained,
Joerg Sonnenberger [Wed, 13 Jul 2005 14:11:42 +0000 (14:11 +0000)]
A lot of software depends on netinet/in.h being self-contained,
so include sys/types.h for now. The namespace pollution is effectively
needed anyway.

MFC after 3 days.

18 years agoDefine struct in_addr in both, arpa/inet.h and netinet/in.h,
Joerg Sonnenberger [Wed, 13 Jul 2005 12:49:56 +0000 (12:49 +0000)]
Define struct in_addr in both, arpa/inet.h and netinet/in.h,
as required by SUS.

MFC after 3 days.

18 years agoSwitch to OpenPAM. The PAM modules are now installed in /usr/lib/security
Joerg Sonnenberger [Wed, 13 Jul 2005 12:34:22 +0000 (12:34 +0000)]
Switch to OpenPAM. The PAM modules are now installed in /usr/lib/security
and versioned, programs using LinuxPAM continue to work for that reason.

18 years agoAdd journaling restart support, required to produce a robust journaling
Matthew Dillon [Wed, 13 Jul 2005 02:00:19 +0000 (02:00 +0000)]
Add journaling restart support, required to produce a robust journaling
environment.  If a journal is writing to one stream and the stream breaks
or dies or otherwise fails, this feature gives us the ability to restart the
journaling stream on a new descriptor without losing any data.  The
journaling restart code does a shutdown() of the old descriptor, waits for
both directions to cease operation, installs a new stream descriptor,
and resets the FIFO index to the last acknowledged offset.

This can be demonstrated by opening two windows.  In the first window do:

    mountctl -a2 /usr:test | jscan -d2 stdin

Mess around a bit on /usr.  Then in the second window do:

    mountctl -r2 /usr:test | jscan -d2 stdin

The first jscan will terminate and the new jscan will pick up the stream.

18 years agoMake shutdown() a fileops operation rather then a socket operation.
Matthew Dillon [Wed, 13 Jul 2005 01:38:54 +0000 (01:38 +0000)]
Make shutdown() a fileops operation rather then a socket operation.
Pipes are full-duplex entities, so implement shutdown support for them.

18 years agoHook up remaining PAM modules. Don't use DPADD for now, it's conflicting
Joerg Sonnenberger [Tue, 12 Jul 2005 23:30:24 +0000 (23:30 +0000)]
Hook up remaining PAM modules. Don't use DPADD for now, it's conflicting
with the LIBDIR setting for the target location.

18 years agoImport current pam_ssh from FreeBSD HEAD.
Joerg Sonnenberger [Tue, 12 Jul 2005 23:26:49 +0000 (23:26 +0000)]
Import current pam_ssh from FreeBSD HEAD.

18 years agoImport current pam_radius from FreeBSD HEAD.
Joerg Sonnenberger [Tue, 12 Jul 2005 23:13:26 +0000 (23:13 +0000)]
Import current pam_radius from FreeBSD HEAD.

18 years agoImport current pam_opieaccess from FreeBSD HEAD.
Joerg Sonnenberger [Tue, 12 Jul 2005 23:08:53 +0000 (23:08 +0000)]
Import current pam_opieaccess from FreeBSD HEAD.

18 years agoImport current pam_krb5 from FreeBSD HEAD.
Joerg Sonnenberger [Tue, 12 Jul 2005 23:04:02 +0000 (23:04 +0000)]
Import current pam_krb5 from FreeBSD HEAD.

18 years agoDPADD is currently broken since LIBDIR != /usr/lib.
Joerg Sonnenberger [Tue, 12 Jul 2005 22:55:46 +0000 (22:55 +0000)]
DPADD is currently broken since LIBDIR != /usr/lib.
Stop using WARNS_NO_UNUSED_PARAMETERS here, fix it instead.

18 years agoImport current pam_opie(8) from FreeBSD HEAD.
Joerg Sonnenberger [Tue, 12 Jul 2005 22:53:20 +0000 (22:53 +0000)]
Import current pam_opie(8) from FreeBSD HEAD.

18 years agoAlso install the pam_tacplus(8) man page.
Joerg Sonnenberger [Tue, 12 Jul 2005 22:45:38 +0000 (22:45 +0000)]
Also install the pam_tacplus(8) man page.

18 years agoImport current pam_tacplus from FreeBSD HEAD.
Joerg Sonnenberger [Tue, 12 Jul 2005 22:34:55 +0000 (22:34 +0000)]
Import current pam_tacplus from FreeBSD HEAD.

18 years agoRemove files I just imported.
Simon Schubert [Tue, 12 Jul 2005 02:25:45 +0000 (02:25 +0000)]
Remove files I just imported.

18 years agoMerge from vendor branch OPENSSH:
Simon Schubert [Tue, 12 Jul 2005 02:24:53 +0000 (02:24 +0000)]
Merge from vendor branch OPENSSH:
Add files that slipped through. Weird, I thought I double checked
everything...

Reported-by: drhodus
18 years agoAdd files that slipped through. Weird, I thought I double checked
Simon Schubert [Tue, 12 Jul 2005 02:24:53 +0000 (02:24 +0000)]
Add files that slipped through. Weird, I thought I double checked
everything...

Reported-by: drhodus
18 years agoSwitch to OpenSSH-4.1p1.
Simon Schubert [Mon, 11 Jul 2005 22:49:46 +0000 (22:49 +0000)]
Switch to OpenSSH-4.1p1.

18 years agoAdd our READMEs.
Simon Schubert [Mon, 11 Jul 2005 22:47:40 +0000 (22:47 +0000)]
Add our READMEs.

18 years agoWelcome a trimmed version of OpenSSH-4.1p1 in the tree.
Simon Schubert [Mon, 11 Jul 2005 22:44:24 +0000 (22:44 +0000)]
Welcome a trimmed version of OpenSSH-4.1p1 in the tree.

18 years agoMerge from vendor branch OPENSSH:
Simon Schubert [Mon, 11 Jul 2005 22:44:24 +0000 (22:44 +0000)]
Merge from vendor branch OPENSSH:
Welcome a trimmed version of OpenSSH-4.1p1 in the tree.

18 years agoRevert part of the ALTQ conversion. It unintenionally removed code which
Joerg Sonnenberger [Sun, 10 Jul 2005 15:17:00 +0000 (15:17 +0000)]
Revert part of the ALTQ conversion. It unintenionally removed code which
is actually needed to wakeup the processing.

Reported-by: Dirk Liebke <dliebke-dfly@yahoo.de>
18 years agovesa.c:
Sascha Wildner [Sun, 10 Jul 2005 13:06:18 +0000 (13:06 +0000)]
vesa.c:

Add a missing bcopy() to make saving the VESA state actually work.
Also save the DAC state, increase the maximum save state size up to
12k, and refuse to save the VESA state if the BIOS reports it is
larger than the maximum size we can handle.

vgareg.h & vga_isa.c:

Save and restore the VGA state across a suspend-resume cycle. This is
particularly useful when VESA is available (either 'options VESA' or
load the vesa module), as BIOSes in some notebooks may correctly save
and restore LCD panel settings using VESA in cases where calling the
video BIOS POST is not effective. On some systems it may also be
necessary to set the hw.acpi.reset_video sysctl to 0.

Obtained from: FreeBSD

18 years agoReally get the libz fix into libstand as well.
Simon Schubert [Sun, 10 Jul 2005 09:40:35 +0000 (09:40 +0000)]
Really get the libz fix into libstand as well.

Reported-by: swildner
18 years agoRemove directory prefix, it's stored in the Makefile.
Simon Schubert [Sun, 10 Jul 2005 09:19:48 +0000 (09:19 +0000)]
Remove directory prefix, it's stored in the Makefile.

18 years agoRefactor the code to use bsd.files.mk, it's a considerable amount
Simon Schubert [Sun, 10 Jul 2005 09:18:12 +0000 (09:18 +0000)]
Refactor the code to use bsd.files.mk, it's a considerable amount
cleaner.

18 years agoUse M_ZERO instead of explicit bzero()s.
Sascha Wildner [Sun, 10 Jul 2005 00:52:24 +0000 (00:52 +0000)]
Use M_ZERO instead of explicit bzero()s.

18 years agoRemove files that were used only for the DEC Alpha architecture.
Sascha Wildner [Sun, 10 Jul 2005 00:09:26 +0000 (00:09 +0000)]
Remove files that were used only for the DEC Alpha architecture.

18 years ago* Remove unneeded <sys/proc.h>
Sascha Wildner [Sat, 9 Jul 2005 22:39:58 +0000 (22:39 +0000)]
* Remove unneeded <sys/proc.h>

* Correct a potential panic condition that could be caused when getting or
  setting the VGA palette.

* Add a free() to fix a rare memory leak (if vga_save_palette2() was not
  successful).

* Check copyin() return values.

* Minor style cleanup.

Obtained from: FreeBSD

18 years agoFix typo: netgarph -> netgraph.
Sascha Wildner [Sat, 9 Jul 2005 21:58:10 +0000 (21:58 +0000)]
Fix typo: netgarph -> netgraph.

18 years agoCatch up with Perl version.
Joerg Sonnenberger [Sat, 9 Jul 2005 20:51:04 +0000 (20:51 +0000)]
Catch up with Perl version.

Submitted-by: Andreas Hauser
18 years agoMake us bootstrap on FreeBSD-6.x. Joerg seemed to fix it before, but
Simon Schubert [Sat, 9 Jul 2005 11:05:10 +0000 (11:05 +0000)]
Make us bootstrap on FreeBSD-6.x. Joerg seemed to fix it before, but
only make got -DBOOTSTRAPPING passed, not CFLAGS.

Reported-by: Robert Sebastian Gerus <arachnist@gmail.com>
18 years agoAdd missing m_freem() in BPF if the mbuf exceeds the interface mtu.
Matthew Dillon [Fri, 8 Jul 2005 18:19:39 +0000 (18:19 +0000)]
Add missing m_freem() in BPF if the mbuf exceeds the interface mtu.

Reported-by: Guy Harris <guy@alum.mit.edu>
18 years agoBuild the PAM modules under lib/pam_module, since they are not
Joerg Sonnenberger [Fri, 8 Jul 2005 15:42:01 +0000 (15:42 +0000)]
Build the PAM modules under lib/pam_module, since they are not
directly related to libpam, other than using it. Use versioned
module names and install them under /usr/lib/security.

Copy pam_cleartext_pass_ok.c from
lib/libpam/modules/pam_cleartext_pass_ok.

18 years agoAdd /usr/lib/security, to be used for PAM modules.
Joerg Sonnenberger [Fri, 8 Jul 2005 15:38:54 +0000 (15:38 +0000)]
Add /usr/lib/security, to be used for PAM modules.

18 years agoMerge from vendor branch OPENPAM:
Joerg Sonnenberger [Fri, 8 Jul 2005 14:39:04 +0000 (14:39 +0000)]
Merge from vendor branch OPENPAM:
Import OpenPAM Figwort.

18 years agoImport OpenPAM Figwort.
Joerg Sonnenberger [Fri, 8 Jul 2005 14:39:04 +0000 (14:39 +0000)]
Import OpenPAM Figwort.

18 years agoAllow radio and statistic dump to use arbitrary interface names.
Joerg Sonnenberger [Fri, 8 Jul 2005 13:17:33 +0000 (13:17 +0000)]
Allow radio and statistic dump to use arbitrary interface names.

Based-on-patch-from: Andreas Hauser

18 years agoAllow disabling of unused parameter warnings. This is handy for third
Joerg Sonnenberger [Fri, 8 Jul 2005 13:05:53 +0000 (13:05 +0000)]
Allow disabling of unused parameter warnings. This is handy for third
party programs, where we are still interested in fixing "real" warnings,
but not interface-bogusness.

18 years agoAlso pull up cat dirs to en_US.ISO8859-1
Simon Schubert [Fri, 8 Jul 2005 08:09:40 +0000 (08:09 +0000)]
Also pull up cat dirs to en_US.ISO8859-1

18 years agoNew openssl installs manual sections 5 and 7, populate the directories
YONETANI Tomokazu [Fri, 8 Jul 2005 03:20:24 +0000 (03:20 +0000)]
New openssl installs manual sections 5 and 7, populate the directories
to fix installworld.

18 years agoAdd counters for recording Token/MPlock contention, this would help in
Hiten Pandya [Thu, 7 Jul 2005 20:28:26 +0000 (20:28 +0000)]
Add counters for recording Token/MPlock contention, this would help in
determining the number of times contention has occured in the system.

The contention counters have been made 64-bit quantities because they
are situated within a tight-loop.

KTR tracepoints have been added for marking start and stop of a token's
contention.  New field tr_flags added to struct lwkt_tokref.  By adding
tracepoints in lwkt_chktokens(9),  it gives us interesting data on MP
machines when it indirectly sends a passive IPI to the remote CPU for
gaining ownership of a token.  It would be interesting to see KTR dumps
for a 4-CPU or an 8-CPU system.

Discussed-with:  Matthew Dillon <dillon@apollo.backplane.com>

18 years agoAdd code comments to improve object type documentation.
Hiten Pandya [Thu, 7 Jul 2005 16:54:02 +0000 (16:54 +0000)]
Add code comments to improve object type documentation.

18 years agoConvert to NEWBUS, remove ISA compat.
Joerg Sonnenberger [Thu, 7 Jul 2005 15:15:24 +0000 (15:15 +0000)]
Convert to NEWBUS, remove ISA compat.

Obtained-from: FreeBSD

Use device_printf / if_printf.
Remove unit from softc.
Strip last parameter of wlsftwsleaze() and wlhdwsleaze(), since they are
never used.
Update various comment on functions
Don't explicitly print MAC address.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoIt's dead, Jim.
Joerg Sonnenberger [Thu, 7 Jul 2005 14:40:12 +0000 (14:40 +0000)]
It's dead, Jim.

18 years agoUse pcidevs. Use common probe style and PCI helper functions.
Joerg Sonnenberger [Thu, 7 Jul 2005 13:23:28 +0000 (13:23 +0000)]
Use pcidevs. Use common probe style and PCI helper functions.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoSync with master copy. This is necessary to allow installworld from
Joerg Sonnenberger [Thu, 7 Jul 2005 13:08:14 +0000 (13:08 +0000)]
Sync with master copy. This is necessary to allow installworld from
the live-CD without any further steps.

18 years agoAdd DragonFly 1.2 rtld. This should enable running -Release binaries
Simon Schubert [Thu, 7 Jul 2005 13:01:46 +0000 (13:01 +0000)]
Add DragonFly 1.2 rtld. This should enable running -Release binaries
on freshly installed -Devel systems.

18 years agoAdd possibility to specify a path to install a compat lib into.
Simon Schubert [Thu, 7 Jul 2005 12:55:04 +0000 (12:55 +0000)]
Add possibility to specify a path to install a compat lib into.

18 years agoAdd a more friendly way to deal with files that are installed into /etc.
Simon Schubert [Thu, 7 Jul 2005 12:43:36 +0000 (12:43 +0000)]
Add a more friendly way to deal with files that are installed into /etc.

18 years agoremove old openssl
Simon Schubert [Thu, 7 Jul 2005 12:32:03 +0000 (12:32 +0000)]
remove old openssl

18 years agoAdd our readmes.
Simon Schubert [Thu, 7 Jul 2005 12:27:54 +0000 (12:27 +0000)]
Add our readmes.

18 years ago- update OpenSSL to 0.9.8
Simon Schubert [Thu, 7 Jul 2005 12:18:31 +0000 (12:18 +0000)]
- update OpenSSL to 0.9.8
- remove assembler files, they were not used lately
- add generated man pages

We don't use the `dynamic engines' feature, tho it could be
added lateron.

18 years agoMerge from vendor branch OPENSSL:
Simon Schubert [Thu, 7 Jul 2005 12:04:51 +0000 (12:04 +0000)]
Merge from vendor branch OPENSSL:
Import of openssl-0.9.8, a feature release.

18 years agoImport of openssl-0.9.8, a feature release.
Simon Schubert [Thu, 7 Jul 2005 12:04:51 +0000 (12:04 +0000)]
Import of openssl-0.9.8, a feature release.

18 years agoconvert ln to ${LN}
Simon Schubert [Thu, 7 Jul 2005 11:49:57 +0000 (11:49 +0000)]
convert ln to ${LN}

18 years agoAdjust the inline to take a pointer to a constant array to avoid a
Matthew Dillon [Thu, 7 Jul 2005 07:20:11 +0000 (07:20 +0000)]
Adjust the inline to take a pointer to a constant array to avoid a
compiler warning.

18 years agoIt is not acceptable to index the array out of bounds if an illegal index
Matthew Dillon [Thu, 7 Jul 2005 07:17:47 +0000 (07:17 +0000)]
It is not acceptable to index the array out of bounds if an illegal index
is passed to a ctype function or macro.  Undo the last commit.  Emplace an
explicit range check for the integer passed to the ctype macros and
functions rather then underflowing or overflowing the array.  Currently
return 0 if the integer is out of range (it might be more appropriate to
assert).

18 years agoRemove explicit int casts for the array index. While it doesn't
Joerg Sonnenberger [Thu, 7 Jul 2005 05:55:05 +0000 (05:55 +0000)]
Remove explicit int casts for the array index. While it doesn't
change the semantic, it allows GCC to warn about chars used as
index, e.g. from isprint(c) with char c.

Obtained-from: NetBSD

18 years agoAdd updated versions of the DragonFly 1.2 compat libs which include
Simon Schubert [Wed, 6 Jul 2005 23:21:36 +0000 (23:21 +0000)]
Add updated versions of the DragonFly 1.2 compat libs which include
various bug and security fixes.

18 years agoAdd forgotten wcstoull.
Joerg Sonnenberger [Wed, 6 Jul 2005 18:23:42 +0000 (18:23 +0000)]
Add forgotten wcstoull.

Noticed-by: Sascha Wildner
18 years agoFix possible buffer overflow in zlib, FreeBSD-SA-05:16.zlib.
Simon Schubert [Wed, 6 Jul 2005 15:02:06 +0000 (15:02 +0000)]
Fix possible buffer overflow in zlib, FreeBSD-SA-05:16.zlib.
Thanks to Collin Percival for giving us a heads up.

Obtained-from: FreeBSD

18 years agoMerge from vendor branch FILE:
Joerg Sonnenberger [Wed, 6 Jul 2005 14:01:57 +0000 (14:01 +0000)]
Merge from vendor branch FILE:
Update to file-4.14. Remove merged patches.

18 years agoUpdate to file-4.14. Remove merged patches.
Joerg Sonnenberger [Wed, 6 Jul 2005 14:01:57 +0000 (14:01 +0000)]
Update to file-4.14. Remove merged patches.

18 years agoUpdate to file-4.14. Remove merged patches.
Joerg Sonnenberger [Wed, 6 Jul 2005 14:01:57 +0000 (14:01 +0000)]
Update to file-4.14. Remove merged patches.

18 years agoWork around a ctype bug when displaying printable characters in the
Matthew Dillon [Wed, 6 Jul 2005 06:21:05 +0000 (06:21 +0000)]
Work around a ctype bug when displaying printable characters in the
debug output.

18 years agoAdd an option and test implementation for the full-duplex ack protocol.
Matthew Dillon [Wed, 6 Jul 2005 06:06:44 +0000 (06:06 +0000)]
Add an option and test implementation for the full-duplex ack protocol.

18 years agoBring mountctl up-to-date with memory fifo statistics structural changes.
Matthew Dillon [Wed, 6 Jul 2005 06:04:32 +0000 (06:04 +0000)]
Bring mountctl up-to-date with memory fifo statistics structural changes.
Implement the two-way protocol option.

18 years agoImplement the full-duplex ack protocol. refurbish some of the memory
Matthew Dillon [Wed, 6 Jul 2005 06:02:23 +0000 (06:02 +0000)]
Implement the full-duplex ack protocol.  refurbish some of the memory
fifo statistics.

18 years agoAdd another argument to fp_read() to tell the kernel to read the entire
Matthew Dillon [Wed, 6 Jul 2005 05:59:43 +0000 (05:59 +0000)]
Add another argument to fp_read() to tell the kernel to read the entire
requested size, looping if necessary.

18 years agoRevert the last commit until a better solution can be found, it breaks
Matthew Dillon [Tue, 5 Jul 2005 20:35:35 +0000 (20:35 +0000)]
Revert the last commit until a better solution can be found, it breaks
the build.

Reported-by: Numerous
18 years agoUse _KERNEL macro for wrapping kernel-only code.
Hiten Pandya [Tue, 5 Jul 2005 20:26:50 +0000 (20:26 +0000)]
Use _KERNEL macro for wrapping kernel-only code.

18 years agoAdd this year's leap second (as announced by Bulletin C 30).
Sascha Wildner [Tue, 5 Jul 2005 18:00:56 +0000 (18:00 +0000)]
Add this year's leap second (as announced by Bulletin C 30).

18 years agoMinor word-smithing.
Hiten Pandya [Tue, 5 Jul 2005 15:57:10 +0000 (15:57 +0000)]
Minor word-smithing.

18 years agoFix filtering on bridged networks. We (actually I) had source and
Simon Schubert [Tue, 5 Jul 2005 10:20:39 +0000 (10:20 +0000)]
Fix filtering on bridged networks. We (actually I) had source and
destination interface reversed, so things were working backwards, but
just for filtering. This makes the code the same like on FreeBSD.

I hope this also fixes dangling state table issues with pf, but we'll see.

18 years agoAdd support for mirroring symlinks and hardlinks.
Matthew Dillon [Tue, 5 Jul 2005 06:20:07 +0000 (06:20 +0000)]
Add support for mirroring symlinks and hardlinks.

18 years agoGenerate the correct referential data when journaling hardlinks.
Matthew Dillon [Tue, 5 Jul 2005 06:19:29 +0000 (06:19 +0000)]
Generate the correct referential data when journaling hardlinks.

18 years agoRemove some debugging printfs and fix a bug where libc's fread() returns
Matthew Dillon [Tue, 5 Jul 2005 04:08:07 +0000 (04:08 +0000)]
Remove some debugging printfs and fix a bug where libc's fread() returns
unexpectedly when a pipe returns less data then requested.

18 years ago* Fix a number of alignment errors that was causing garbage to be parsed.
Matthew Dillon [Tue, 5 Jul 2005 02:38:34 +0000 (02:38 +0000)]
* Fix a number of alignment errors that was causing garbage to be parsed.
* Fix a stream cache bug that was preventing some writes from synchronizing
  properly.
* Report PAD headers as PAD headers rather then as unknown data.

18 years agoMajor continuing work on jscan, the userland backend for the journaling
Matthew Dillon [Tue, 5 Jul 2005 00:26:03 +0000 (00:26 +0000)]
Major continuing work on jscan, the userland backend for the journaling
system.

* Fix bugs in the stream demultiplexing code.  Only the first stream header
  is supposed to be passed to the virtualized stream code.  We were passing
  the stream header and trailer for each meta record and the extra meta-data
  really confused the virtualized stream scanning code.

* Add support for unknown nesting record sizes.  This occurs when the
  nesting record in the virtual stream is too large to fit in the kernel's
  in-memory journal FIFO.  This allows us to arbitrarily push and pop
  elements of a transaction without having to know the size of the completed
  transaction in advance.

* Use a 64 bit integer to calculate the completed transaction size.  Note
  however that currently the stream reconstruction code uses malloc so
  there are serious limits to what it can reconstruct.

* Implement (partial) support for mirroring.  Only basic file and directory
  creation, write, remove, and rename is currently decoded.

The TODO list is long and varied.  We need to use mmap() instead of malloc()
to reference journal data.  We need to finish implementing mirror mode.  We
need a catch-up or restart mode for the mirror.  We need raw journal data
logging, we need stream ackknowledgements, and a thousand other things.

This example will maintain a mirror of /usr in /usr_mirror in real time.
Again, remember that there is a lot more work to do.... the mirroring isn't
perfect by a long shot.  We don't do symlinks for example, yet, and there
are many other issues.

    # Warning: do not ^Z mountctl!
    cpdup /usr /usr_mirror
    cd /usr_mirror
    mountctl -a /usr:test | jscan -m stdin
    [does not return]
    [to terminate, type 'mountctl -d test' in another shell window]

18 years agoThe size of a nesting record may not be known (due to the virtual stream
Matthew Dillon [Tue, 5 Jul 2005 00:14:27 +0000 (00:14 +0000)]
The size of a nesting record may not be known (due to the virtual stream
being larger then the in-memory FIFO).  Instead of setting the header
size to 8, set it to -1 to make this case clear.

18 years agoRename the variable PROG to LDR to remove a warning message about
Jeroen Ruigrok/asmodai [Mon, 4 Jul 2005 21:39:05 +0000 (21:39 +0000)]
Rename the variable PROG to LDR to remove a warning message about
'line 43: warning: duplicate script for target "loader" ignored"'.

The thing was that ${PROG}: was specified later on in the Makefile, which
conflicts with line 39 from bsd.prog.mk, which is:

${PROG}: ${OBJS}

thus redefining ${PROG} or rather loader.

18 years agoFix a few issues in the kernel-side journal.
Matthew Dillon [Mon, 4 Jul 2005 21:05:54 +0000 (21:05 +0000)]
Fix a few issues in the kernel-side journal.

* Fix a missing vattr record in CREATE.
* Fix a misgenerated mode attribute.
* Fix a misgenerated file offset for the O_APPEND case.
* The 16 bit record type is unsigned, not signed (fixes comparisons in jscan)
* Add JTYPE_MASK against the record type for JTYPE and JLEAF comparisons.

18 years agoFix two installworld mtree warnings.
Jeroen Ruigrok/asmodai [Mon, 4 Jul 2005 21:05:27 +0000 (21:05 +0000)]
Fix two installworld mtree warnings.

This will most likely be revisited in the future.

18 years agoThe pipe code was not properly handling kernel space writes. Such writes
Matthew Dillon [Mon, 4 Jul 2005 18:39:16 +0000 (18:39 +0000)]
The pipe code was not properly handling kernel space writes.  Such writes
can be made by the journaling code when journaling to a pipe.

18 years agoDon't forget to install the magic manpage, too.
Sascha Wildner [Mon, 4 Jul 2005 17:19:34 +0000 (17:19 +0000)]
Don't forget to install the magic manpage, too.

18 years agoDo not abort the entire core dump if VOP_VPTOFH() fails. VPTOFH is not
Matthew Dillon [Mon, 4 Jul 2005 16:02:58 +0000 (16:02 +0000)]
Do not abort the entire core dump if VOP_VPTOFH() fails.  VPTOFH is not
currently supported on NFS file handles.  This simply means that a checkpoint
restore will not work (for now).  The core itself will still be fine.

Reported-by: Richard Nyberg <rnyberg@it.su.se>
18 years agoOnly symlink if we're building either sendmail or mailwrapper.
Simon Schubert [Mon, 4 Jul 2005 13:35:18 +0000 (13:35 +0000)]
Only symlink if we're building either sendmail or mailwrapper.

Obtained-from: FreeBSD

18 years ago- Merge few fixes from NetBSD/FreeBSD.
Simon Schubert [Mon, 4 Jul 2005 13:33:02 +0000 (13:33 +0000)]
- Merge few fixes from NetBSD/FreeBSD.
- Update DIAGNOSTICS to reflect reality

18 years agoMerge various changes from NetBSD, OpenBSD and FreeBSD, especially:
Simon Schubert [Mon, 4 Jul 2005 11:36:30 +0000 (11:36 +0000)]
Merge various changes from NetBSD, OpenBSD and FreeBSD, especially:
- add command line arguments to the end, not to the beginning
  of the argument list. This enables us to do
sendmail /usr/bin/ssh -T mymailhost sendmail
  and it won't come out as "ssh -i mail@addr -T mailhost sendmail" as
  we had it (and OpenBSD and FreeBSD still have).

- remove freeing of memory when we err() anyways
- set progname so we have understandable error messages which actually
  originate from mailwrapper

18 years agoSync with NetBSD:
Joerg Sonnenberger [Mon, 4 Jul 2005 10:11:57 +0000 (10:11 +0000)]
Sync with NetBSD:
* add some comments.
* add some functions:
   _citrus_memory_stream_bind_ptr()
   _citrus_memory_stream_tell()
   _citrus_memory_stream_ungetc()
   _citrus_region_get_subregion()
* fix a bug in _citrus_memory_stream_seek().

18 years agoSync with NetBSD:
Joerg Sonnenberger [Mon, 4 Jul 2005 10:04:52 +0000 (10:04 +0000)]
Sync with NetBSD:
* add some comments.
* add some functions:
   _citrus_memory_stream_bind_ptr()
   _citrus_memory_stream_tell()
   _citrus_memory_stream_ungetc()
   _citrus_region_get_subregion()
* fix a bug in _citrus_memory_stream_seek().

18 years agoDeclare module for mapper_parallel explicitly to allow static linking.
Joerg Sonnenberger [Mon, 4 Jul 2005 08:52:56 +0000 (08:52 +0000)]
Declare module for mapper_parallel explicitly to allow static linking.

18 years agoAllow inclusion of Citrus modules in statically linked binaries.
Joerg Sonnenberger [Mon, 4 Jul 2005 08:02:43 +0000 (08:02 +0000)]
Allow inclusion of Citrus modules in statically linked binaries.

To achieve this, ensure that _citrus_module_$MOD is referenced
from the binary and link with -L/usr/lib/i18n -l$MOD for all
modules you are interested in.

18 years agoUse M_ASSERTPKTHDR. (Obtained-from: FreeBSD)
Joerg Sonnenberger [Mon, 4 Jul 2005 07:32:37 +0000 (07:32 +0000)]
Use M_ASSERTPKTHDR. (Obtained-from: FreeBSD)
Use NULL instead of 0 for pointers.
Indentation and line breaks.
Use ifp instead of arpcom where sensible.
Remove some obsolete declarations.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
18 years agoUse local storage for MAC address.
Joerg Sonnenberger [Mon, 4 Jul 2005 07:26:46 +0000 (07:26 +0000)]
Use local storage for MAC address.

Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>