dragonfly.git
18 years agoConvert to vop_write_dirent.
Joerg Sonnenberger [Fri, 19 Aug 2005 14:02:39 +0000 (14:02 +0000)]
Convert to vop_write_dirent.

18 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
18 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

18 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.

18 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
18 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.

18 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.

18 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

18 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.

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

18 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.

18 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.

18 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

18 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.

18 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>
18 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.

18 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>
18 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.

18 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>
18 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().

18 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)

18 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.

18 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.

18 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.

18 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
18 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

18 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.

18 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

18 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.

18 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.

18 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.

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

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

18 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.

18 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.

18 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.

18 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.

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

18 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.

18 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.

18 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.

18 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.

18 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.

18 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>
18 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>
18 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.

18 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.

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

Obtained-from: FreeBSD

18 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

18 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>
18 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>
18 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>
18 years ago- State default
Liam J. Foy [Wed, 10 Aug 2005 11:29:49 +0000 (11:29 +0000)]
- State default

18 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.

18 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.

18 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)

18 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.

18 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.

18 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.

18 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.

18 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.

18 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.

18 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.

18 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.

18 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).

18 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.

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

18 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

18 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>
18 years agoWhitespace cleanup.
Hiten Pandya [Tue, 9 Aug 2005 05:11:42 +0000 (05:11 +0000)]
Whitespace cleanup.

18 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.

18 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.

18 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.

18 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.

18 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.

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

18 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.

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

18 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.

18 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.

18 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.

18 years agoMAXNAMELEN ==> PATH_MAX
Joerg Sonnenberger [Mon, 8 Aug 2005 16:39:17 +0000 (16:39 +0000)]
MAXNAMELEN ==> PATH_MAX

18 years agoDon't match entries by hand, just use strcmp. It is efficient enough for
Joerg Sonnenberger [Mon, 8 Aug 2005 16:17:04 +0000 (16:17 +0000)]
Don't match entries by hand, just use strcmp. It is efficient enough for
"." and "..".

18 years agoDon't check for zero-length direntries, expect the system to handle
Joerg Sonnenberger [Mon, 8 Aug 2005 15:25:42 +0000 (15:25 +0000)]
Don't check for zero-length direntries, expect the system to handle
that. Just strdup the dirent_name.

18 years agoInstead of MAXNAMELEN, use NAME_MAX for now. This should be revisited
Joerg Sonnenberger [Mon, 8 Aug 2005 13:38:49 +0000 (13:38 +0000)]
Instead of MAXNAMELEN, use NAME_MAX for now. This should be revisited
latter to allocate the entry dynamically. Add CVS id.

18 years agoInstead of trying to compute the local storage based on maximum entry
Joerg Sonnenberger [Mon, 8 Aug 2005 13:00:12 +0000 (13:00 +0000)]
Instead of trying to compute the local storage based on maximum entry
size, use PATH_MAX. The former might get variable, the latter is more
likely to stay constant for a while.

18 years agoAdd minimal utility that is able to make sense of the per-cpu load
Hiten Pandya [Mon, 8 Aug 2005 03:31:00 +0000 (03:31 +0000)]
Add minimal utility that is able to make sense of the per-cpu load
accounting struct kinfo_cputime, or previously known as 'cputime'.

It should reside under src/test because it is not complete and only
implements the base logic for those people interested who want to
incorporate this code into top(1) or some other accounting program
of their own.

--
Polish the 'Makefile' while I am around this end of the source tree.

18 years ago_PC_NAME_MAX is NAME_MAX, so use that for the storage allocation as
Joerg Sonnenberger [Mon, 8 Aug 2005 02:01:31 +0000 (02:01 +0000)]
_PC_NAME_MAX is NAME_MAX, so use that for the storage allocation as
well.

18 years agoisab_attach() is called from acpi_isab_attach(), so it's supposed to
YONETANI Tomokazu [Mon, 8 Aug 2005 01:47:21 +0000 (01:47 +0000)]
isab_attach() is called from acpi_isab_attach(), so it's supposed to
be a non-static function.

18 years agoBUF/BIO cleanup 7/99:
Hiten Pandya [Mon, 8 Aug 2005 01:25:31 +0000 (01:25 +0000)]
BUF/BIO cleanup 7/99:

First attempt at separating low-level information from BUF structure into
the new BIO structure.  The latter will be used to represent the actual
I/O underlying the buffer cache, other subsystems and device drivers.

Other information from the BUF structure will be moved eventually once
their place in the grand scheme is determined.  For now, preprocess macros
have been added to reduce widespread changes; this is a temporary measure
by all means until more of the BIO and BUF API is formalised.

Remove compatibility preprocessor macros in the AAC driver because our
BUF/BIO system is mutating; not to mention they were getting in the way.

NB the name BIO has been used because it's quite appropriate and known
among kernel developers from other operating system groups, be it BSD or
Linux.

This change should not have any operational affect (famous last words).

Reviewed by: Matthew Dillon <dillon@dragonflybsd.org>

18 years agoReimport devlist2h.awk from FreeBSD, this version actually works. It
Joerg Sonnenberger [Sun, 7 Aug 2005 22:43:17 +0000 (22:43 +0000)]
Reimport devlist2h.awk from FreeBSD, this version actually works. It
also allows proper dependency handling in Makefile.usbdevs by separating
the output via options. Regen with the new script.

18 years agoMove up CVS IDs, first must be DragonFly.
Joerg Sonnenberger [Sun, 7 Aug 2005 22:37:54 +0000 (22:37 +0000)]
Move up CVS IDs, first must be DragonFly.

18 years agoA better description for 'debug.sizeof' sysctl.
Hiten Pandya [Sun, 7 Aug 2005 22:11:53 +0000 (22:11 +0000)]
A better description for 'debug.sizeof' sysctl.

18 years agoAdd ethernet port of JVC MP-PRX1.
Joerg Sonnenberger [Sun, 7 Aug 2005 21:49:15 +0000 (21:49 +0000)]
Add ethernet port of JVC MP-PRX1.

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

18 years agoRemove redundant assignment.
Joerg Sonnenberger [Sun, 7 Aug 2005 19:16:15 +0000 (19:16 +0000)]
Remove redundant assignment.

18 years agoDon't depend on struct dirent == struct direct, but fully separate the
Joerg Sonnenberger [Sun, 7 Aug 2005 17:08:38 +0000 (17:08 +0000)]
Don't depend on struct dirent == struct direct, but fully separate the
processing. The code is derived from ext2's readdir.

18 years agoANSIfy.
Joerg Sonnenberger [Sun, 7 Aug 2005 15:43:02 +0000 (15:43 +0000)]
ANSIfy.

18 years agoIt's actually 11 minutes when the machine is assumed to be down and removed
Liam J. Foy [Sun, 7 Aug 2005 10:36:41 +0000 (10:36 +0000)]
It's actually 11 minutes when the machine is assumed to be down and removed
from the output.

18 years agoRemove trailing /.
Jeroen Ruigrok/asmodai [Sun, 7 Aug 2005 08:40:42 +0000 (08:40 +0000)]
Remove trailing /.

18 years agoCleanup some lint warnings.
Max Okumoto [Sun, 7 Aug 2005 08:16:52 +0000 (08:16 +0000)]
Cleanup some lint warnings.
o Removed coma after last enum.
o Removed unused include of hash.h
o Removed unused forward declaration of struct List.