dragonfly.git
14 years agoAlso document BGE_FAKE_AUTONEG in LINT.
Joerg Sonnenberger [Mon, 22 Aug 2005 22:05:48 +0000 (22:05 +0000)]
Also document BGE_FAKE_AUTONEG in LINT.

14 years agoUpdate the TWE 3ware/AMCC driver code, bringing in all the fixes made
Hiten Pandya [Mon, 22 Aug 2005 21:16:20 +0000 (21:16 +0000)]
Update the TWE 3ware/AMCC driver code, bringing in all the fixes made
by Vinod Kashyap and Paul Saab in FreeBSD-5/STABLE, and retaining
those by David Rhodus and Matthew Dillon.

Remove some compatibility preprocessor BUF/BIO compatibility macros.

Changeset thoroughly tested by Tomaz Borstnar, Matthew Dillon and
David Rhodus.  Inspired by a heads-up from YONETANI Tomokazu.

14 years agoGC unused macro.
Joerg Sonnenberger [Mon, 22 Aug 2005 20:21:21 +0000 (20:21 +0000)]
GC unused macro.

noticed-by: dillon

14 years agoCreate a kernel option BGE_FAKE_AUTONEG for IBM/Intel blade servers,
Joerg Sonnenberger [Mon, 22 Aug 2005 18:29:52 +0000 (18:29 +0000)]
Create a kernel option BGE_FAKE_AUTONEG for IBM/Intel blade servers,
which should make the DNLK switch module work.  IBM/Intel blade server
with Intel or AD switch modules should work without the kernel options

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoAdd descriptive comment back in
Simon Schubert [Mon, 22 Aug 2005 16:53:26 +0000 (16:53 +0000)]
Add descriptive comment back in

14 years agoInstead of resetting the video buffer's history size to the system
Matthew Dillon [Sun, 21 Aug 2005 19:11:28 +0000 (19:11 +0000)]
Instead of resetting the video buffer's history size to the system
default, reset it to the last vidcontrol-specified size.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
14 years agoHave vidcontrol set the video history size based on a new rc.conf variable,
Matthew Dillon [Sun, 21 Aug 2005 19:08:12 +0000 (19:08 +0000)]
Have vidcontrol set the video history size based on a new rc.conf variable,
'vidhistory'.

Submitted-by: Alexey Slynko <slynko@tronet.ru>
14 years agoRemove the hack that varied the first character of the output file name
Liam J. Foy [Sun, 21 Aug 2005 18:58:34 +0000 (18:58 +0000)]
Remove the hack that varied the first character of the output file name
if none was specified on the command line. This is not permitted by
POSIX, and no longer needed now that we have the -a option.

Taken from: FreeBSD
Requested by: hmp@

14 years ago* Add a definition for a panic key (CNTL-ALT-SHIFT-ESC) to every keymap
Sascha Wildner [Sat, 20 Aug 2005 19:22:37 +0000 (19:22 +0000)]
* Add a definition for a panic key (CNTL-ALT-SHIFT-ESC) to every keymap
  file that didn't already have one. This can be useful for producing a
  dump when DDB is not compiled in or otherwise unavailable. In order to
  use the panic key set the sysctl machdep.enable_panic_key to 1.

* Regenerate the kernel default keymap.

14 years agoRemove PC98 support.
Sascha Wildner [Sat, 20 Aug 2005 18:51:28 +0000 (18:51 +0000)]
Remove PC98 support.

14 years agoHPFS != UFS, so use the right constant for directory entries. Check
Joerg Sonnenberger [Sat, 20 Aug 2005 18:37:21 +0000 (18:37 +0000)]
HPFS != UFS, so use the right constant for directory entries. Check
explicitly for wraparound or negative offsets, don't depend on type
limits to do that.

14 years agoConvert to use vop_write_dirent.
Simon Schubert [Sat, 20 Aug 2005 13:26:58 +0000 (13:26 +0000)]
Convert to use vop_write_dirent.

14 years agoscm test.
David Rhodus [Fri, 19 Aug 2005 19:22:38 +0000 (19:22 +0000)]
scm test.

14 years agoPrevent spurious link state changes.
Joerg Sonnenberger [Fri, 19 Aug 2005 14:43:30 +0000 (14:43 +0000)]
Prevent spurious link state changes.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoEnable the memory arbiter before turning off the PXE restart. This
Joerg Sonnenberger [Fri, 19 Aug 2005 14:42:19 +0000 (14:42 +0000)]
Enable the memory arbiter before turning off the PXE restart.  This
prevents NMI's from happening when resetting the chip on some hardware
I have seen.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoAtomically load and clear the status block. This makes the bge
Joerg Sonnenberger [Fri, 19 Aug 2005 14:41:07 +0000 (14:41 +0000)]
Atomically load and clear the status block.  This makes the bge
devices work much better when interrupts are shared.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years ago5705K, 5714C, 5721, 5750, 5750M, 5751M, 5789 support.
Joerg Sonnenberger [Fri, 19 Aug 2005 14:40:03 +0000 (14:40 +0000)]
5705K, 5714C, 5721, 5750, 5750M, 5751M, 5789 support.
Add some hacks from the Broadcom Linux driver. Reorder initialisation to
give bge_reset / bge_chipinit what it needs.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoRegen.
Joerg Sonnenberger [Fri, 19 Aug 2005 14:36:21 +0000 (14:36 +0000)]
Regen.

14 years agoAdd some new Broadcom IDs.
Joerg Sonnenberger [Fri, 19 Aug 2005 14:35:53 +0000 (14:35 +0000)]
Add some new Broadcom IDs.

Based-on: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoConvert to vop_write_dirent.
Joerg Sonnenberger [Fri, 19 Aug 2005 14:02:39 +0000 (14:02 +0000)]
Convert to vop_write_dirent.

14 years agoImprove C++ support.
Joerg Sonnenberger [Thu, 18 Aug 2005 17:11:09 +0000 (17:11 +0000)]
Improve C++ support.

Obtained-from: FreeBSD
Submitted-by: Andreas Hauser
14 years agoCheck result of setenv(putenv) function.
Max Okumoto [Thu, 18 Aug 2005 07:58:30 +0000 (07:58 +0000)]
Check result of setenv(putenv) function.

Submitted by: Alexey Slynko

14 years agoThe bix bug was introduced on commit 2005/05/20 04:48:55
Max Okumoto [Wed, 17 Aug 2005 09:04:40 +0000 (09:04 +0000)]
The bix bug was introduced on commit 2005/05/20 04:48:55
When I changed the API for str_concat().  Instead
of passing a space character I passed a '/'

Bug found by Jonathon McKitrick.

14 years agoExplicitly specify `all' as the default target(as it used to be), so as
YONETANI Tomokazu [Wed, 17 Aug 2005 02:51:45 +0000 (02:51 +0000)]
Explicitly specify `all' as the default target(as it used to be), so as
issuing make command without target name in the kernel build directory
won't end up building the first target.

Reported-by: Noritoshi Demizu
14 years agoMake links for hoststat(8) and purgestat(8) man pages.
Gregory Neil Shapiro [Wed, 17 Aug 2005 02:47:06 +0000 (02:47 +0000)]
Make links for hoststat(8) and purgestat(8) man pages.

14 years agoUse vop_write_dirent. Correctly handle the case of spare fd tables, e.g.
Joerg Sonnenberger [Tue, 16 Aug 2005 22:40:03 +0000 (22:40 +0000)]
Use vop_write_dirent. Correctly handle the case of spare fd tables, e.g.
0, 1, 2 and 8 are open and 3 to 7 are closed.

14 years agoUtilize vop_write_dirent. Slightly change the order by writing to
Joerg Sonnenberger [Tue, 16 Aug 2005 21:37:54 +0000 (21:37 +0000)]
Utilize vop_write_dirent. Slightly change the order by writing to
userland first and fetching the inode information afterwards. This
should be save and removes the need for copying the name first.

Basic testing by: Sergey Gluschenko

14 years agoConvert to vop_write_dirent.
Joerg Sonnenberger [Tue, 16 Aug 2005 19:16:39 +0000 (19:16 +0000)]
Convert to vop_write_dirent.

XXX The loop is now left on the first error, which makes a lot more
sense, but can also slightly change the behaviour. The old behaviour was
clearly wrong.

14 years agoSprinkle some const.
Joerg Sonnenberger [Tue, 16 Aug 2005 16:27:41 +0000 (16:27 +0000)]
Sprinkle some const.

14 years agoHonor process visibility for jailed processes and ps_showallprocs for
Joerg Sonnenberger [Tue, 16 Aug 2005 16:10:34 +0000 (16:10 +0000)]
Honor process visibility for jailed processes and ps_showallprocs for
non-root users. Move the check for invalid offsets into
linprocfs_readdir.

14 years agoSplit the two parts of procfs_readdir into subroutines.
Joerg Sonnenberger [Tue, 16 Aug 2005 16:09:05 +0000 (16:09 +0000)]
Split the two parts of procfs_readdir into subroutines.
Don't scale offsets by the maximum directory entry size.
Honor visibility of processes for jailed processes.
Prefer LIST_* macros over direct access.

14 years agoGet rid of 4.x-derived acpi code:
YONETANI Tomokazu [Tue, 16 Aug 2005 10:31:35 +0000 (10:31 +0000)]
Get rid of 4.x-derived acpi code:
- move most part of /sys/dev/acpica5/Makefile.inc into /sys/conf/acpi.mk
- rename SYSACPICA_DIR, OSACPI_DIR to ACPICA_DIR and ACPI_MI_DIR,
  make them relative to $S (or $SYSDIR) so as they can be shared between
  kernel and modules builds
- remove 4.x ACPI lines from, and add acpica5 lines to, /sys/conf/files*
- make LINT to use `device acpi' instead of older `device acpica'
- adjust ACPI driver build wrapper and ACPI tools to use /sys/conf/acpi.mk

14 years agoSplit the two parts of linprocfs_readdir into subroutines.
Joerg Sonnenberger [Mon, 15 Aug 2005 16:50:51 +0000 (16:50 +0000)]
Split the two parts of linprocfs_readdir into subroutines.
We can generate arbitrary offsets, so factor out the directory entry
length and use the index directly. Use vop_write_dirent.

14 years agoConvert RANDOM_IP_ID into a sysctl.
Matthew Dillon [Mon, 15 Aug 2005 16:46:22 +0000 (16:46 +0000)]
Convert RANDOM_IP_ID into a sysctl.

Submitted-by: Gordon Bergling <gbergling@0xfce3.net>
14 years agoRip off PROCFS_ZOMBIE, it wasn't even a knob to play with.
Joerg Sonnenberger [Mon, 15 Aug 2005 13:49:55 +0000 (13:49 +0000)]
Rip off PROCFS_ZOMBIE, it wasn't even a knob to play with.

14 years agoUFS sometimes reports: 'ufs_rename: fvp == tvp (can't happen)'. The case
Matthew Dillon [Mon, 15 Aug 2005 07:26:47 +0000 (07:26 +0000)]
UFS sometimes reports: 'ufs_rename: fvp == tvp (can't happen)'.  The case
is not supposed to be able to happen, and UFS ignores the rename operation
when it sees it.   This is true in both FreeBSD and DragonFly.

But, in fact, the case CAN happen if you rename a file to another that
happens to be a hardlink to the first.  The rename operations appears to
succeed but winds up being a NOP because UFS incorrectly believes that the
case represents renaming a file to itself when it doesn't.  Both files
remain in existance when the source file should have been removed.

Detect the condition and issue VOP_NREMOVE instead of VOP_NRENAME when
the source and target represent different namespaces but wind up pointing
to the same physical vnode.

Reported-by: =?ISO-8859-2?Q?Toma=BE_Bor=B9tnar?= <tomaz.borstnar@amis.net>
14 years agoFix an inode bitmap scanning bug. Due to an error in the length adjustment
Matthew Dillon [Sun, 14 Aug 2005 18:53:42 +0000 (18:53 +0000)]
Fix an inode bitmap scanning bug.  Due to an error in the length adjustment
the first scanned byte of the inode bitmap could be checked twice under a
specific and rare but intentionally reproducable set of conditions.  This
resulted in a sanity check failing and a panic.  The required conditions are:

* Very few available inodes in the cylinder group.

* All available inodes are still in the inode hashmap (related vnodes have
  not been completely destroyed yet) and thus skipped.

* The first scanned byte (indexed by the rotor) contains one of these
  not-quite-free inodes.

It should be noted that even though this error exists in FreeBSD-4, the
conditions never occur to trigger it becaues FreeBSD-4 will reuse a vnode
that is still not completely destroyed.  DragonFly does not reuse such vnodes
because they represent a weird and fairly rare code situation that could
lead to bugs, and because attempting to reuse such vnodes/inodes represent
potential stall points.

Found-with: blogbench script provided by Tomaz Borstnar.

14 years agoFix a race in rename when relocking the source namecache entry. Since we
Matthew Dillon [Sun, 14 Aug 2005 18:41:13 +0000 (18:41 +0000)]
Fix a race in rename when relocking the source namecache entry.  Since we
may have blocked previously it is possible for the namecache entry to become
invalid (not destroyed since we hold a ref, but invalid).  For example, if
the source was removed.  This case only occurs when rename() is racing
against a remove() or another rename that is overwriting the target that
represents our 'from' name.

The race resulted in a NULL pointer dereference.

Reported-by: =?ISO-8859-2?Q?Toma=BE_Bor=B9tnar?= <tomaz.borstnar@amis.net>
14 years agoAdd a sanity check for the length of the file name to vop_write_dirent().
Matthew Dillon [Sun, 14 Aug 2005 18:38:27 +0000 (18:38 +0000)]
Add a sanity check for the length of the file name to vop_write_dirent().

14 years agoAllow the VESA code to handle devices that don't claim to be VGA devices.
Sascha Wildner [Sat, 13 Aug 2005 16:43:34 +0000 (16:43 +0000)]
Allow the VESA code to handle devices that don't claim to be VGA devices.
This fixes VESA support when running under vmware.

Taken from: FreeBSD (rev. 1.51)

14 years agoWe want to separate dirent and the maximum directory entry size.
Joerg Sonnenberger [Fri, 12 Aug 2005 17:51:09 +0000 (17:51 +0000)]
We want to separate dirent and the maximum directory entry size.
Therefore use "broken" behaviour of zero-length dirent->d_name.
Add mental note to be careful when looking at OpenSSH code again, what
they call broken might be a lot more correct and the other way around.

14 years agoThe packages have been moved to the fireflybsd server now as it is a
David Rhodus [Fri, 12 Aug 2005 15:57:22 +0000 (15:57 +0000)]
The packages have been moved to the fireflybsd server now as it is a
much faster server than the previous one.  Update the URL in the
pkg_add tool to download from the new location.

14 years agoRemove PV_* flags from PMAP MD header files; these were made useless
Hiten Pandya [Fri, 12 Aug 2005 00:25:10 +0000 (00:25 +0000)]
Remove PV_* flags from PMAP MD header files; these were made useless
when Dyson rewrote the VM system in FreeBSD, about 10 years ago.

Inspiration from same change in FreeBSD by Alan Cox.

14 years agoMove bio_lblkno (logical blockno in a file) field back to its rightful
Hiten Pandya [Fri, 12 Aug 2005 00:17:26 +0000 (00:17 +0000)]
Move bio_lblkno (logical blockno in a file) field back to its rightful
place, which is in struct buf.  Lower levels have no knowledge of this
little critter.

Suggested-by: dillon
14 years ago- In the ICMP debug code, use %d over %x. This makes it much easier when
Liam J. Foy [Thu, 11 Aug 2005 20:47:30 +0000 (20:47 +0000)]
- In the ICMP debug code, use %d over %x. This makes it much easier when
reading ip_icmp.h when the debug code is used.

OK: hsu

14 years agoFix merge bug. d_namlen is used by GENERIC_DIRSIZ, when it isn't
Joerg Sonnenberger [Thu, 11 Aug 2005 09:27:00 +0000 (09:27 +0000)]
Fix merge bug. d_namlen is used by GENERIC_DIRSIZ, when it isn't
initialised, the argument to bzero is wrong.

14 years ago- Use M_WAITOK in attach()
Simon Schubert [Thu, 11 Aug 2005 03:22:57 +0000 (03:22 +0000)]
- Use M_WAITOK in attach()
- Check for malloc failure in M_NOWAIT cases

14 years agoDon't panic if we can't allocate memory.
Simon Schubert [Thu, 11 Aug 2005 03:20:36 +0000 (03:20 +0000)]
Don't panic if we can't allocate memory.

14 years agoOnly use variable if malloc succeeded.
Simon Schubert [Thu, 11 Aug 2005 03:19:39 +0000 (03:19 +0000)]
Only use variable if malloc succeeded.

14 years agoTest for malloc returning NULL.
Simon Schubert [Thu, 11 Aug 2005 03:16:14 +0000 (03:16 +0000)]
Test for malloc returning NULL.
Not sure if doing nothing is the best solution.

14 years agoCorrect typo.
Simon Schubert [Thu, 11 Aug 2005 03:11:59 +0000 (03:11 +0000)]
Correct typo.

14 years agoMy first commit.
Noritoshi Demizu [Thu, 11 Aug 2005 01:08:08 +0000 (01:08 +0000)]
My first commit.

14 years agoUse vop_write_dirent. Allocate a temporary buffer for the name for now,
Joerg Sonnenberger [Wed, 10 Aug 2005 18:02:00 +0000 (18:02 +0000)]
Use vop_write_dirent. Allocate a temporary buffer for the name for now,
but this can most likely be optimised later.

14 years agoWrap 'pqtype' variable with INVARIANTS so annoying GCC warnings are
Hiten Pandya [Wed, 10 Aug 2005 17:53:58 +0000 (17:53 +0000)]
Wrap 'pqtype' variable with INVARIANTS so annoying GCC warnings are
not triggered.

14 years agoReplace the 4.3BSD getdirentries compat function with something which is
Joerg Sonnenberger [Wed, 10 Aug 2005 17:11:45 +0000 (17:11 +0000)]
Replace the 4.3BSD getdirentries compat function with something which is
much more likely to work. The old dirent is basically the on-disk format
of UFS, so the reordering done for little endian machines in ufs_readdir
is reverted here, which should also catch the native order of all other
filesystem. I'm not 100% sure if this change is correct, but the old
code was broken at best, so it shouldn't make matters worse.

14 years agoAdd _DIRENT_NEXT, which is for now only used in the kernel to skip to
Joerg Sonnenberger [Wed, 10 Aug 2005 17:08:49 +0000 (17:08 +0000)]
Add _DIRENT_NEXT, which is for now only used in the kernel to skip to
the next dirent. It will be changed to a different implementation shared
between kernel and userland, once the dirent structure itself is
changed.

14 years agoUse vop_write_dirent.
Joerg Sonnenberger [Wed, 10 Aug 2005 16:58:54 +0000 (16:58 +0000)]
Use vop_write_dirent.

14 years agoContinue (not return) if OP_LIB is not set.
Sascha Wildner [Wed, 10 Aug 2005 16:50:36 +0000 (16:50 +0000)]
Continue (not return) if OP_LIB is not set.

See 1.138 -> 1.139.

14 years agoUse new vop_write_dirent function.
Joerg Sonnenberger [Wed, 10 Aug 2005 16:46:17 +0000 (16:46 +0000)]
Use new vop_write_dirent function.

14 years agoUpdate GCC 3.4 to current 3.4.5 pre-release.
Joerg Sonnenberger [Wed, 10 Aug 2005 15:50:47 +0000 (15:50 +0000)]
Update GCC 3.4 to current 3.4.5 pre-release.

14 years agoMerge from vendor branch GCC:
Joerg Sonnenberger [Wed, 10 Aug 2005 15:50:47 +0000 (15:50 +0000)]
Merge from vendor branch GCC:
Update GCC 3.4 to current 3.4.5 pre-release.

14 years agoUpdate GCC 3.4 to current 3.4.5 pre-release.
Joerg Sonnenberger [Wed, 10 Aug 2005 15:50:47 +0000 (15:50 +0000)]
Update GCC 3.4 to current 3.4.5 pre-release.

14 years agoBreak long commits. Don't ask for transfers when there's nothing to
Joerg Sonnenberger [Wed, 10 Aug 2005 15:18:52 +0000 (15:18 +0000)]
Break long commits. Don't ask for transfers when there's nothing to
transfer.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoSet baudrate to 100Mbps and advertise VLAN.
Joerg Sonnenberger [Wed, 10 Aug 2005 15:08:50 +0000 (15:08 +0000)]
Set baudrate to 100Mbps and advertise VLAN.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoAdd vop_write_dirent helper functions, which isolates the caller from
Joerg Sonnenberger [Wed, 10 Aug 2005 14:28:34 +0000 (14:28 +0000)]
Add vop_write_dirent helper functions, which isolates the caller from
the layout and setup of struct dirent.

14 years agoSync with recent libc and libm changes.
Joerg Sonnenberger [Wed, 10 Aug 2005 14:09:16 +0000 (14:09 +0000)]
Sync with recent libc and libm changes.

14 years agoAdd wcsftime(3).
Joerg Sonnenberger [Wed, 10 Aug 2005 13:42:28 +0000 (13:42 +0000)]
Add wcsftime(3).

Obtained-from: FreeBSD

14 years agoIf possible, use builtin constants for newer GCC versions, but fallback
Joerg Sonnenberger [Wed, 10 Aug 2005 13:40:54 +0000 (13:40 +0000)]
If possible, use builtin constants for newer GCC versions, but fallback
to libc variables otherwise. Add support for C99 comparision macros,
using the builtins when available.

Obtained-from: FreeBSD

14 years agoSet both, CRC32 generation and LED modes. Clear powerdown control bit.
Joerg Sonnenberger [Wed, 10 Aug 2005 13:38:35 +0000 (13:38 +0000)]
Set both, CRC32 generation and LED modes. Clear powerdown control bit.
Cast an index to uint32_t before shifting it.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years agoRevive multicast support, it got lost in the initial import.
Joerg Sonnenberger [Wed, 10 Aug 2005 13:36:14 +0000 (13:36 +0000)]
Revive multicast support, it got lost in the initial import.

Obtained-from: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years ago- Propagate error code from various bus_dma functions in bfe_dma_alloc.
Joerg Sonnenberger [Wed, 10 Aug 2005 13:31:03 +0000 (13:31 +0000)]
- Propagate error code from various bus_dma functions in bfe_dma_alloc.
- Correctly destroy dmamaps for partially initialised descriptor rings
in bfe_dma_alloc, if one of the dmamap creations failed.
- Centralise error handling of bfe_attach in bfe_detach.
- Move call to bfe_chip_reset in bfe_detach into the device_is_attached
section.
- Move bus_teardown_intr() and bus_release_resource() from
bfe_release_resources to bfe_detach; rename the former to bfe_dma_free
to reflect remaining code.
- Call bus_dmamem_free only if the pointer is not NULL, set it to NULL
after it has been destroyed.
- Do not destroy dmamaps in bfe_stop, do it in bfe_detach.
- Correct DMA sync directions in bfe_list_newbuf.

Based-on: FreeBSD
Submitted-by: Sepherosa Ziehau <sepherosa@gmail.com>
14 years ago- State default
Liam J. Foy [Wed, 10 Aug 2005 11:29:49 +0000 (11:29 +0000)]
- State default

14 years agoRe-word some sysctl descriptions, make them compact.
Hiten Pandya [Wed, 10 Aug 2005 01:11:19 +0000 (01:11 +0000)]
Re-word some sysctl descriptions, make them compact.

14 years agoFix a bug introduced by 1.6. The 'cp' pointer was being incremented twice
Matthew Dillon [Wed, 10 Aug 2005 00:43:37 +0000 (00:43 +0000)]
Fix a bug introduced by 1.6.  The 'cp' pointer was being incremented twice
in getanswer() for each NS_GET*() call because the new macro used already does
an increment.  This prevented sendmail (and any program using the res_query
mechanism) from operating properly.

14 years agoUse Var_SetGlobal() instead of Var_Set(XX,YY, VAR_GLOBAL)
Max Okumoto [Tue, 9 Aug 2005 23:34:07 +0000 (23:34 +0000)]
Use Var_SetGlobal() instead of Var_Set(XX,YY, VAR_GLOBAL)

14 years agoFix a bug in the last commit. When using the UFS dirent directly,
Matthew Dillon [Tue, 9 Aug 2005 23:10:11 +0000 (23:10 +0000)]
Fix a bug in the last commit.  When using the UFS dirent directly,
the inode field is d_ino, not d_filenum.

14 years agoRemove Hitler quotes. This for sure is something I don't want to see.
Simon Schubert [Tue, 9 Aug 2005 22:55:04 +0000 (22:55 +0000)]
Remove Hitler quotes.  This for sure is something I don't want to see.

Having entertaining quotes of somebody who was responsible for genocide
does not honour the gravity of the incidents.

14 years agoPass the direction to kern_getdirentries, it will be used by the
Joerg Sonnenberger [Tue, 9 Aug 2005 20:14:16 +0000 (20:14 +0000)]
Pass the direction to kern_getdirentries, it will be used by the
emulation layer soon without transfering the data to userland first.

14 years agoJust expect either the kernel or libc to drop empty dirents.
Joerg Sonnenberger [Tue, 9 Aug 2005 20:05:55 +0000 (20:05 +0000)]
Just expect either the kernel or libc to drop empty dirents.

14 years agoWhen allocating memory for the index file, query the filesystem for the
Joerg Sonnenberger [Tue, 9 Aug 2005 19:26:59 +0000 (19:26 +0000)]
When allocating memory for the index file, query the filesystem for the
maximum entry name first and use that.

14 years agofsfind should use direct here, not dirent.
Joerg Sonnenberger [Tue, 9 Aug 2005 19:19:08 +0000 (19:19 +0000)]
fsfind should use direct here, not dirent.

14 years agoUse vn_get_namelen to provide correct f_namemax field.
Joerg Sonnenberger [Tue, 9 Aug 2005 18:48:43 +0000 (18:48 +0000)]
Use vn_get_namelen to provide correct f_namemax field.

14 years agoDon't hide errors from kern_statfs by overwriting error, check if it was
Joerg Sonnenberger [Tue, 9 Aug 2005 18:45:09 +0000 (18:45 +0000)]
Don't hide errors from kern_statfs by overwriting error, check if it was
successful first.

14 years agoKill stackgap in (f)statvfs(64).
Joerg Sonnenberger [Tue, 9 Aug 2005 18:26:27 +0000 (18:26 +0000)]
Kill stackgap in (f)statvfs(64).

14 years agoUse vn_get_namelen to reduce bogusnes.
Joerg Sonnenberger [Tue, 9 Aug 2005 18:14:26 +0000 (18:14 +0000)]
Use vn_get_namelen to reduce bogusnes.

14 years agoActually install lesspipe.sh
Simon Schubert [Tue, 9 Aug 2005 18:08:42 +0000 (18:08 +0000)]
Actually install lesspipe.sh

14 years agoAdd vn_get_namelen to simplify correct emulation of statfs with maximum
Joerg Sonnenberger [Tue, 9 Aug 2005 16:53:34 +0000 (16:53 +0000)]
Add vn_get_namelen to simplify correct emulation of statfs with maximum
name length field.

Discussed-with: hmp

14 years agoPort a major reworking of the way IPS driver commands are managed from
Matthew Dillon [Tue, 9 Aug 2005 16:23:13 +0000 (16:23 +0000)]
Port a major reworking of the way IPS driver commands are managed from
FreeBSD.

Submitted-by: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>
Testing-by: =?ISO-8859-2?Q?Toma=BE_Bor=B9tnar?= <tomaz.borstnar@amis.net>
14 years agoWhitespace cleanup.
Hiten Pandya [Tue, 9 Aug 2005 05:11:42 +0000 (05:11 +0000)]
Whitespace cleanup.

14 years agoMake a few PRINTF lines readable, break them up if necessary.
Hiten Pandya [Tue, 9 Aug 2005 02:49:49 +0000 (02:49 +0000)]
Make a few PRINTF lines readable, break them up if necessary.

14 years agoChange return type of CompatMake() to void since no one uses it and it
Max Okumoto [Mon, 8 Aug 2005 20:52:45 +0000 (20:52 +0000)]
Change return type of CompatMake() to void since no one uses it and it
always returns zero anyway.

14 years agoUse NAME_MAX instead of MAXNAMLEN. Cast ino_t to uint64_t + proper
Joerg Sonnenberger [Mon, 8 Aug 2005 18:58:56 +0000 (18:58 +0000)]
Use NAME_MAX instead of MAXNAMLEN. Cast ino_t to uint64_t + proper
format specifier in a snprintf.

14 years agoUse NAME_MAX instead of MAXNAMELEN, replace a strncpy with strlcpy.
Joerg Sonnenberger [Mon, 8 Aug 2005 18:36:28 +0000 (18:36 +0000)]
Use NAME_MAX instead of MAXNAMELEN, replace a strncpy with strlcpy.

14 years agoMake it actually compile without warnings.
Joerg Sonnenberger [Mon, 8 Aug 2005 18:14:31 +0000 (18:14 +0000)]
Make it actually compile without warnings.

14 years agoCleanup Job_CheckCommands()
Max Okumoto [Mon, 8 Aug 2005 17:33:17 +0000 (17:33 +0000)]
Cleanup Job_CheckCommands()

14 years agoRemove stale comment about vm_mem_init's arguments.
Hiten Pandya [Mon, 8 Aug 2005 17:14:33 +0000 (17:14 +0000)]
Remove stale comment about vm_mem_init's arguments.

14 years agoMatch "." and ".." with strcmp.
Joerg Sonnenberger [Mon, 8 Aug 2005 17:06:18 +0000 (17:06 +0000)]
Match "." and ".." with strcmp.

14 years agoMove the bswlist symbol into vm/vm_pager.c because PBUFs are the only
Hiten Pandya [Mon, 8 Aug 2005 16:53:12 +0000 (16:53 +0000)]
Move the bswlist symbol into vm/vm_pager.c because PBUFs are the only
consumer of the latter.

The PBUF abstraction is just a clever hack, this code will be redone
at some point so this measure is temporary.

14 years agoUse NAME_MAX instead of MAXNAMLEN and strlcpy, since dp->d_name is
Joerg Sonnenberger [Mon, 8 Aug 2005 16:49:48 +0000 (16:49 +0000)]
Use NAME_MAX instead of MAXNAMLEN and strlcpy, since dp->d_name is
NUL-terminated.

14 years agoBoth file and dp->d_name are NUL-terminated, so it pointless to first
Joerg Sonnenberger [Mon, 8 Aug 2005 16:43:33 +0000 (16:43 +0000)]
Both file and dp->d_name are NUL-terminated, so it pointless to first
run strlen, compare the size and do a strncmp afterwards -- just strcmp.