]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
16 years agomore style(9)
David E. O'Brien [Fri, 4 Jan 2008 03:08:49 +0000 (03:08 +0000)]
more style(9)

16 years agoEnable both sbrk(2)- and mmap(2)-based memory acquisition methods by
Jason Evans [Thu, 3 Jan 2008 23:22:13 +0000 (23:22 +0000)]
Enable both sbrk(2)- and mmap(2)-based memory acquisition methods by
default.  This has the disadvantage of rendering the datasize resource
limit irrelevant, but without this change, legitimate uses of more
memory than will fit in the data segment are thwarted by default.

Fix chunk_alloc_mmap() to work correctly if initial mapping is not
chunk-aligned and mapping extension fails.

16 years ago- loader(8) is not a part of boot(8) and is not its second stage.
Daniel Gerzo [Thu, 3 Jan 2008 20:54:34 +0000 (20:54 +0000)]
- loader(8) is not a part of boot(8) and is not its second stage.

Reported by: Yoshihiko Sarumaru <mistral at imasy.or.jp>
Reviewed by: trhodes
MFC-after: 3 days

16 years agoCrib {be,le}{16,32,64}{dec,enc} from src/sys/sys/endian.h and use it instead
Dag-Erling Smørgrav [Thu, 3 Jan 2008 18:30:37 +0000 (18:30 +0000)]
Crib {be,le}{16,32,64}{dec,enc} from src/sys/sys/endian.h and use it instead
of home-rolled [iu][248] in the ZIP support code.

Approved by: kientzle

16 years agoAdd an internal utility function to simplify the many, many places where
Dag-Erling Smørgrav [Thu, 3 Jan 2008 17:54:26 +0000 (17:54 +0000)]
Add an internal utility function to simplify the many, many places where
the number of bytes read is actually not important as long as we have at
least what we ask for.  Illustrate its benefits by using it throughout
the ZIP support code, except for the few cases where it doesn't apply.

Approved by: kientzle

16 years agoAdd missing sb_sndptr* fields to db_print_sockbuf().
Bjoern A. Zeeb [Thu, 3 Jan 2008 15:19:31 +0000 (15:19 +0000)]
Add missing sb_sndptr* fields to db_print_sockbuf().
While here change %d to %u for u_ints.

Discussed with: rwatson, kmacy

16 years agoffs_balloc_ufsX() routines, in the case of recovering from the failed
Konstantin Belousov [Thu, 3 Jan 2008 12:28:57 +0000 (12:28 +0000)]
ffs_balloc_ufsX() routines, in the case of recovering from the failed
allocation, free the indirect blocks before clearing the disk pointers,
that could lead to the softupdate inconsistencies in the case of the
machine or disk crash at the wrong time.

Rearrange the recover code to do the ffs_blkfree() after the second
ffs_syncvnode(), that clears the pointers chain.

Proposed and reviewed by: tegge
Tested by: Peter Holm
MFC after: 3 weeks

16 years agoAdd an access type parameter to pmap_enter(). It will be used to implement
Alan Cox [Thu, 3 Jan 2008 07:34:34 +0000 (07:34 +0000)]
Add an access type parameter to pmap_enter().  It will be used to implement
superpage promotion.

Correct a style error in kmem_malloc(): pmap_enter()'s last parameter is
a Boolean.

16 years agoUse correct function name in panic message
Warner Losh [Thu, 3 Jan 2008 06:44:12 +0000 (06:44 +0000)]
Use correct function name in panic message

16 years agoFix obsolete comment. pmap_remove_all is the function we're in.
Warner Losh [Thu, 3 Jan 2008 06:35:04 +0000 (06:35 +0000)]
Fix obsolete comment.  pmap_remove_all is the function we're in.

16 years agoModernize comment about diagnostic.
Warner Losh [Thu, 3 Jan 2008 06:31:41 +0000 (06:31 +0000)]
Modernize comment about diagnostic.

16 years ago - In sysctl_kern_file skip fdps with negative lastfiles. This can
Jeff Roberson [Thu, 3 Jan 2008 01:26:59 +0000 (01:26 +0000)]
 - In sysctl_kern_file skip fdps with negative lastfiles.  This can
   happen if there are no files open.  Accounting for these can
   eventually return a negative value for olenp causing sysctl to
   crash with a bad malloc.

Reported by: Pawel Worach <pawel.worach@gmail.com>

16 years agoThe break() system call takes a pointer argument, not an integer. This
Jason Evans [Thu, 3 Jan 2008 00:18:03 +0000 (00:18 +0000)]
The break() system call takes a pointer argument, not an integer.  This
change fixes output for break() on LP64 systems.

16 years agostyle(9)
David E. O'Brien [Wed, 2 Jan 2008 23:26:11 +0000 (23:26 +0000)]
style(9)
+ kread is not a boolean, so check it as such
+ fix $FreeBSD$ Ids
+ denote copyrights with /*-
+ misc whitespace changes.

16 years agoIf the disk reports that it support the Compact Flash Association command
Poul-Henning Kamp [Wed, 2 Jan 2008 20:33:54 +0000 (20:33 +0000)]
If the disk reports that it support the Compact Flash Association command
set, announce BIO_DELETE capability and issue ATA_CFA_ERASE when we get one.

Once we issue more BIO_DELETE, this will improve lifetime, and
possibly write speed of Flash based devices which have usable flash
adaptation layers.

For now, about the only usage is the newfs(1) -E flag.

Approved by: sos

16 years agoFollow the current fashion of gratuitously stomping into other
Poul-Henning Kamp [Wed, 2 Jan 2008 20:31:14 +0000 (20:31 +0000)]
Follow the current fashion of gratuitously stomping into other
peoples code with irrelevant changes[1]:

Use bus_{read|write_*() instead of bus_space_{read|write}_*() for
purely stylistic reasons.

Due to compiler optimizations and inlining, this is for all practical
purposes without effect in the compiled code.

[1] NB: Approved by: sos

16 years agoNote what is too {short,long}.
David E. O'Brien [Wed, 2 Jan 2008 18:48:27 +0000 (18:48 +0000)]
Note what is too {short,long}.

16 years agoA few whitespace fixes.
John Baldwin [Wed, 2 Jan 2008 17:09:15 +0000 (17:09 +0000)]
A few whitespace fixes.

16 years agoProvide a legitimate pindex to vm_page_alloc() in pmap_growkernel()
Alan Cox [Wed, 2 Jan 2008 08:54:39 +0000 (08:54 +0000)]
Provide a legitimate pindex to vm_page_alloc() in pmap_growkernel()
instead of writing apologetic comments.  As it turns out, I need every
kernel page table page to have a legitimate pindex to support superpage
promotion on kernel memory.

Correct a nearby style error: Pointers should be compared to NULL.

16 years agoDefer setting either PG_CACHED or PG_FREE until after the free page
Alan Cox [Wed, 2 Jan 2008 04:43:47 +0000 (04:43 +0000)]
Defer setting either PG_CACHED or PG_FREE until after the free page
queues lock is acquired.  Otherwise, the state of a reservation's
pages' flags and its population count can be inconsistent.  That could
result in a page being freed twice.

Reported by: kris

16 years agostyle(9)
David E. O'Brien [Wed, 2 Jan 2008 01:45:31 +0000 (01:45 +0000)]
style(9)

16 years agostyle(9)
David E. O'Brien [Wed, 2 Jan 2008 01:19:17 +0000 (01:19 +0000)]
style(9)

16 years agoRemove the old bsdtar test scripts; something much
Tim Kientzle [Wed, 2 Jan 2008 00:28:44 +0000 (00:28 +0000)]
Remove the old bsdtar test scripts; something much
better is almost ready to commit.

16 years agoA couple of miscellaneous fixes:
Tim Kientzle [Wed, 2 Jan 2008 00:27:14 +0000 (00:27 +0000)]
A couple of miscellaneous fixes:
  * prototypes for optarg/optind on platforms that don't already have them
  * Disambiguate version number macros
  * Remove unnecessary PACKAGE_NAME macro
  * Hook for forthcoming bsdtar test suite
  * Sync version number up with the portable distribution

16 years agoFill in the approximate date when tar(1) first appeared.
Tim Kientzle [Wed, 2 Jan 2008 00:24:10 +0000 (00:24 +0000)]
Fill in the approximate date when tar(1) first appeared.

16 years agoInclude a suitable stub definition of __FBSDID() for non-FreeBSD platforms.
Tim Kientzle [Wed, 2 Jan 2008 00:23:00 +0000 (00:23 +0000)]
Include a suitable stub definition of __FBSDID() for non-FreeBSD platforms.

16 years agoUse archive_entry_strmode() instead of a local bsdtar_strmode().
Tim Kientzle [Wed, 2 Jan 2008 00:21:27 +0000 (00:21 +0000)]
Use archive_entry_strmode() instead of a local bsdtar_strmode().
(This does a couple of things that the standard library's strmode()
doesn't; it proved useful in bsdcpio as well, so I pushed it down
into libarchive.)

16 years agoInclude Guido's copyright for the fnmatch() code I cribbed from.
Tim Kientzle [Wed, 2 Jan 2008 00:19:49 +0000 (00:19 +0000)]
Include Guido's copyright for the fnmatch() code I cribbed from.
(It's in the C source, just wasn't in the COPYING file until now.)

16 years agoNew release notes: ddb(4) capture, ddb(4) scripting, textdump(4),
Bruce A. Mah [Tue, 1 Jan 2008 23:58:18 +0000 (23:58 +0000)]
New release notes:  ddb(4) capture, ddb(4) scripting, textdump(4),
ncurses 5.6-20071222, tzdata2007k.

Bump copyright date while here.

16 years agoMinor nits. Add xr to sn.
Warner Losh [Tue, 1 Jan 2008 22:29:22 +0000 (22:29 +0000)]
Minor nits.  Add xr to sn.

16 years agoExtensive improvements to the libarchive_test test program that
Tim Kientzle [Tue, 1 Jan 2008 22:28:04 +0000 (22:28 +0000)]
Extensive improvements to the libarchive_test test program that
exercises and verifies the libarchive APIs:

* Improved error reporting; hexdumps are now provided for
  many file/memory content differences.
* Overall status more clearly counts "tests" and "assertions"
* Reference files can now be stored on disk instead of having
  to be compiled into the test program itself.  A couple of
  tests have been converted to this more natural structure.
* Several memory leaks corrected so that leaks within libarchive
  itself can be more easily detected and diagnosed.
* New test: GNU tar compatibility
* New test: Zip compatibility
* New test: Zero-byte writes to a compressed archive entry
* New test: archive_entry_strmode() format verification
* New test: mtree reader
* New test: write/read of large (2G - 1TB) entries to tar archives
  (thanks to recent performance work, this test only requires a few seconds)
* New test: detailed format verification of cpio odc and newc writers
* Many minor additions/improvements to existing tests as well.

16 years agoForgot to mention RLT80x9 support that was added some time ago.
Warner Losh [Tue, 1 Jan 2008 21:41:39 +0000 (21:41 +0000)]
Forgot to mention RLT80x9 support that was added some time ago.

16 years agoSync to the new PCI device IDs that I added to if_ed_pci.c. Bump date.
Warner Losh [Tue, 1 Jan 2008 21:37:09 +0000 (21:37 +0000)]
Sync to the new PCI device IDs that I added to if_ed_pci.c.  Bump date.

16 years agoCorrect a style error that was introduced in revision 1.77.
Alan Cox [Tue, 1 Jan 2008 20:36:04 +0000 (20:36 +0000)]
Correct a style error that was introduced in revision 1.77.

16 years agoAdd my birthday to the calendar.
Weongyo Jeong [Tue, 1 Jan 2008 10:29:22 +0000 (10:29 +0000)]
Add my birthday to the calendar.

Approved by: thompsa (mentor)

16 years agoAdd myself and my mentor
Weongyo Jeong [Tue, 1 Jan 2008 10:25:01 +0000 (10:25 +0000)]
Add myself and my mentor

Approved by: thompsa (mentor)

16 years agofollow style(9) more closely and list sys/types.h first after sys/defs.h.
Warner Losh [Tue, 1 Jan 2008 10:04:10 +0000 (10:04 +0000)]
follow style(9) more closely and list sys/types.h first after sys/defs.h.

Submitted by: max@

16 years agoMFV of tzdata2007k.
Edwin Groothuis [Tue, 1 Jan 2008 07:47:42 +0000 (07:47 +0000)]
MFV of tzdata2007k.

- Adjust Argentinian DST times.
- Add SJ on the right location.

16 years agoThe mtree.5 file has been moved to src/usr.sbin/mtree.
Tim Kientzle [Tue, 1 Jan 2008 06:17:05 +0000 (06:17 +0000)]
The mtree.5 file has been moved to src/usr.sbin/mtree.

16 years agoAdd the mtree.5 manpage. I'll come back soon and
Tim Kientzle [Tue, 1 Jan 2008 06:15:57 +0000 (06:15 +0000)]
Add the mtree.5 manpage.  I'll come back soon and
remove the format specification from mtree.8.
I also need to reconcile a few issues between this
mtree.5 and what is actually implemented in FreeBSD's
mtree utility.

MFC after: 30 days

16 years agoChange sysinstall's handling of X11 stuff. Doing it in pieces was
Ken Smith [Tue, 1 Jan 2008 03:59:17 +0000 (03:59 +0000)]
Change sysinstall's handling of X11 stuff.  Doing it in pieces was
probably the right thing to do a while ago but xorg has progressed
to the point that for novice users (who are the ones expected to think
installing X11 during an install...) it's best to just install the
whole x11/xorg metaport for them.  This removes the X11 sub-menus
and sets it up so you just select whether or not you want X11.  While
here garbage collect an X11 configuration menu I missed removing when
I removed support for attempting xorg configuration from inside sysinstall
a while ago.

Discussed with: rwatson, kris
No objection from: re
Release build tested by: rwatson

MFC after: 1 week

16 years ago - Place the fhold() in unp_internalize_fp to be more consistent with refs.
Jeff Roberson [Tue, 1 Jan 2008 01:46:42 +0000 (01:46 +0000)]
 - Place the fhold() in unp_internalize_fp to be more consistent with refs.
 - Clear all of the gc flags before doing a run.  Stale flags were causing
   us to skip some descriptors.
 - If a unp socket has been marked REF in a gc pass it can't be dead.

Found by: rwatson's test tool.

16 years agoDon't duplicate the whole of arpresolve to arpresolve 2 for the sake
Julian Elischer [Mon, 31 Dec 2007 23:48:06 +0000 (23:48 +0000)]
Don't duplicate the whole of arpresolve to arpresolve 2 for the sake
of two compares against 0. The negative effect of cache flushing
is probably more than the gain by not doing the two compares (the
value is almost certainly in register or at worst, cache).
Note that the uses of m_freem() are in error cases and m_freem()
handles NULL anyhow. So fast-path really isn't changed much at all.

16 years agoIn vfs_scanopt(), make sure that the mount option value is not NULL
Craig Rodrigues [Mon, 31 Dec 2007 23:44:53 +0000 (23:44 +0000)]
In vfs_scanopt(), make sure that the mount option value is not NULL
before calling vsscanf().

PR: 118531
Submitted by: Jaakko Heinonen <jh saunalahti fi>
MFC after: 3 days

16 years agoHappy new year 2008!
Xin LI [Mon, 31 Dec 2007 22:09:19 +0000 (22:09 +0000)]
Happy new year 2008!

16 years agoActually declare the kern.features sysctl node.
John Baldwin [Mon, 31 Dec 2007 22:03:57 +0000 (22:03 +0000)]
Actually declare the kern.features sysctl node.

Pointy hat to: jhb

16 years agoInclude a "pae" feature if an i386 kernel is built with PAE support.
John Baldwin [Mon, 31 Dec 2007 21:12:45 +0000 (21:12 +0000)]
Include a "pae" feature if an i386 kernel is built with PAE support.

Obtained from: Yahoo!

16 years agoAdd very basic support for the kernel to export a list of features. Each
John Baldwin [Mon, 31 Dec 2007 21:12:05 +0000 (21:12 +0000)]
Add very basic support for the kernel to export a list of features.  Each
feature is represented by a node in the new 'kern.features' sysctl node.
A feature is present if the corresponding node is present and evaluates to
true.

A FEATURE() wrapper macro is added which takes the sysctl node name and
a description of the feature as the sole arguments and creates a read-only
sysctl node with a value of 1.

Discussed on: arch

16 years agoUpdate netisr comment for the SMPng world order: netisr is no longer
Robert Watson [Mon, 31 Dec 2007 20:58:50 +0000 (20:58 +0000)]
Update netisr comment for the SMPng world order: netisr is no longer
implemented using the ISR facility, and cannot be triggered by calling
splnet()/splx().

MFC after: 3 weeks

16 years agoFix a few small typos, and remove one duplicate.
Doug Barton [Mon, 31 Dec 2007 18:38:32 +0000 (18:38 +0000)]
Fix a few small typos, and remove one duplicate.

I'm intentionally not sorting this file since it won't be added to.
(Although, if it were sorted the duplicate would have been easier to see.)

:)

16 years agoAdd regression tests for UNIX domain socket garbage collection. Should be
Robert Watson [Mon, 31 Dec 2007 16:45:27 +0000 (16:45 +0000)]
Add regression tests for UNIX domain socket garbage collection.  Should be
run from single-user mode, as they look at global open file and inflight
descriptor counts to check for leaks.

16 years agoUse devclass_get_count() instead of devclass_get_maxunit() to get the
John Baldwin [Mon, 31 Dec 2007 15:56:03 +0000 (15:56 +0000)]
Use devclass_get_count() instead of devclass_get_maxunit() to get the
correct number of acpi_thermalX devices.  Having this wrong caused the
acpi_thermal thread to realloc the array of devices on each loop iteration.

MFC after: 1 week
PR: kern/118497
Submitted by: Pasi Parviainen

16 years agoAdd device IDs for the ICH9 family.
Dag-Erling Smørgrav [Mon, 31 Dec 2007 11:44:01 +0000 (11:44 +0000)]
Add device IDs for the ICH9 family.

PR: i386/119126
Submitted by: Dan Lukes <dan@obluda.cz>
MFC after: 1 week

16 years agoTabify.
Dag-Erling Smørgrav [Mon, 31 Dec 2007 11:42:31 +0000 (11:42 +0000)]
Tabify.

16 years agoFix a major chunk-related memory leak in chunk_dealloc_dss_record(). [1]
Jason Evans [Mon, 31 Dec 2007 06:19:48 +0000 (06:19 +0000)]
Fix a major chunk-related memory leak in chunk_dealloc_dss_record(). [1]

Clean up DSS-related locking and protect all pertinent variables with
dss_mtx (remove dss_chunks_mtx).  This fixes race conditions that could
cause chunk leaks.

Reported by: [1] kris

16 years ago - Pause a while after disabling lock profiling and before resetting it
Jeff Roberson [Mon, 31 Dec 2007 03:45:51 +0000 (03:45 +0000)]
 - Pause a while after disabling lock profiling and before resetting it
   to be sure that all participating CPUs have stopped updating it.
 - Restore the behavior of printing the name of the lock type in the output.

16 years ago - Check the correct variable against NULL in two places.
Jeff Roberson [Mon, 31 Dec 2007 03:44:54 +0000 (03:44 +0000)]
 - Check the correct variable against NULL in two places.
 - If the unp_file is NULL that means it has never been internalized and it
   must be reachable.

16 years agoReduce diffs to vendor's 1.11.17.
David E. O'Brien [Mon, 31 Dec 2007 03:42:05 +0000 (03:42 +0000)]
Reduce diffs to vendor's 1.11.17.

16 years agoAdd Winbond W89C940F to the list. Also, stub in some entries for two
Warner Losh [Mon, 31 Dec 2007 03:29:02 +0000 (03:29 +0000)]
Add Winbond W89C940F to the list.  Also, stub in some entries for two
Holtek cards that will need some special support later, but leave them
commented out for now.

These ID's are transcribed from the Linux ne2k-pci.c

16 years agoAdd missing 'sc->chip_type ==' to an ugly switch statement expression
Warner Losh [Mon, 31 Dec 2007 03:27:21 +0000 (03:27 +0000)]
Add missing 'sc->chip_type ==' to an ugly switch statement expression
so that for RealTek 8019 cards, we consider AUI as well as BNC bits.

16 years agoPass any unmatched slowprotocols frames up the stack instead of dropping them,
Andrew Thompson [Mon, 31 Dec 2007 01:16:35 +0000 (01:16 +0000)]
Pass any unmatched slowprotocols frames up the stack instead of dropping them,
there are more subtypes than just LACP.

16 years agoFix a bug related to sbrk() calls that could cause address space leaks.
Jason Evans [Mon, 31 Dec 2007 00:59:16 +0000 (00:59 +0000)]
Fix a bug related to sbrk() calls that could cause address space leaks.
This is a long-standing bug, but until recent changes it was difficult
to trigger, and even then its impact was non-catastrophic, with the
exception of revision 1.157.

Optimize chunk_alloc_mmap() to avoid the need for unmapping pages in the
common case.  Thanks go to Kris Kennaway for a patch that inspired this
change.

Do not maintain a record of previously mmap'ed chunk address ranges.
The original intent was to avoid the extra system call overhead in
chunk_alloc_mmap(), which is no longer a concern.  This also allows some
simplifications for the tree of unused DSS chunks.

Introduce huge_mtx and dss_chunks_mtx to replace chunks_mtx.  There was
no compelling reason to use the same mutex for these disjoint purposes.

Avoid memset() for huge allocations when possible.

Maintain two trees instead of one for tracking unused DSS address
ranges.  This allows scalable allocation of multi-chunk huge objects in
the DSS.  Previously, multi-chunk huge allocation requests failed if the
DSS could not be extended.

16 years agostyle(9)
Greg Lehey [Sun, 30 Dec 2007 22:04:04 +0000 (22:04 +0000)]
style(9)

16 years agoIf we can't open a calendar file, don't guess why. Check the error
Greg Lehey [Sun, 30 Dec 2007 22:02:50 +0000 (22:02 +0000)]
If we can't open a calendar file, don't guess why.  Check the error
return and print a useful message.

Prior to this commit, access problems could give rise to messages that
the file didn't exist.

16 years agoUse kbdd_* macros.
Yoshihiro Takahashi [Sun, 30 Dec 2007 12:27:31 +0000 (12:27 +0000)]
Use kbdd_* macros.

16 years ago- Update notes
Rong-En Fan [Sun, 30 Dec 2007 11:19:29 +0000 (11:19 +0000)]
- Update notes

16 years ago- Update build glue for 5.6-20071222
Rong-En Fan [Sun, 30 Dec 2007 11:17:40 +0000 (11:17 +0000)]
- Update build glue for 5.6-20071222

16 years ago- Resolve conflicts
Rong-En Fan [Sun, 30 Dec 2007 11:15:46 +0000 (11:15 +0000)]
- Resolve conflicts
- Our changes in lib_termcap.c is now merged in upstream

16 years agoThis commit was generated by cvs2svn to compensate for changes in r174996,
Rong-En Fan [Sun, 30 Dec 2007 11:10:17 +0000 (11:10 +0000)]
This commit was generated by cvs2svn to compensate for changes in r174996,
which included commits to RCS files with non-trunk default branches.

16 years agoThis commit was generated by cvs2svn to compensate for changes in r174993,
Rong-En Fan [Sun, 30 Dec 2007 11:08:14 +0000 (11:08 +0000)]
This commit was generated by cvs2svn to compensate for changes in r174993,
which included commits to RCS files with non-trunk default branches.

16 years agoImport ncurses 5.6-20071222 snapshot onto the vender branch
Rong-En Fan [Sun, 30 Dec 2007 11:08:14 +0000 (11:08 +0000)]
Import ncurses 5.6-20071222 snapshot onto the vender branch

16 years agoRather than not redirting the bp when we get ENXIO, only redirty it
Warner Losh [Sun, 30 Dec 2007 05:53:45 +0000 (05:53 +0000)]
Rather than not redirting the bp when we get ENXIO, only redirty it
when the error is EIO.  This catches a much larger class of errors
that are unlikely to succeed if retried.

Submitted by: bde

16 years agoUpdate libarchive to 2.4.10. This includes a number of improvements
Tim Kientzle [Sun, 30 Dec 2007 04:58:22 +0000 (04:58 +0000)]
Update libarchive to 2.4.10.  This includes a number of improvements
that I've been working on but put off committing until after the
RELENG_7 branch, including:

* New manpages: cpio.5 mtree.5
* New archive_entry_strmode()
* New archive_entry_link_resolver()
* New read support: mtree format
* Internal API change:  read format auction only runs once
* Running the auction only once allowed simplifying a lot of bid logic.
* Cpio robustness:  search for next header after a sync error
* Support device nodes on ISO9660 images
* Eliminate a lot of unnecessary copies for uncompressed archives
* Corrected handling of new GNU --sparse --posix formats
* Correctly handle a zero-byte write to a compressed archive
* Fixed memory leaks

Many of these improvements were motivated by the upcoming bsdcpio
front-end.

There have also been extensive improvements to the libarchive_test
test harness, which I'll commit separately.

16 years agoComments fixing
Andrey A. Chernov [Sun, 30 Dec 2007 03:08:52 +0000 (03:08 +0000)]
Comments fixing
1) Back out "month names" -> "months names" and fix few such cases which
are wrong initially
2) "weekdays names" -> "weekday names"

Noted by: des [1]

16 years ago - Update kvm_deadfiles to be compatible with the new system which has no
Jeff Roberson [Sun, 30 Dec 2007 01:43:51 +0000 (01:43 +0000)]
 - Update kvm_deadfiles to be compatible with the new system which has no
   global list of all files.
 - Mark kvm_getfiles() as broken since the live version exports struct xfile
   with no filelist at the head and does so incorrectly and the deadfiles
   version exports struct file with a filelist at the head.  It is not known
   if either version works or complies to the manpage.

16 years agoRemove explicit locking of struct file.
Jeff Roberson [Sun, 30 Dec 2007 01:42:15 +0000 (01:42 +0000)]
Remove explicit locking of struct file.
 - Introduce a finit() which is used to initailize the fields of struct file
   in such a way that the ops vector is only valid after the data, type,
   and flags are valid.
 - Protect f_flag and f_count with atomic operations.
 - Remove the global list of all files and associated accounting.
 - Rewrite the unp garbage collection such that it no longer requires
   the global list of all files and instead uses a list of all unp sockets.
 - Mark sockets in the accept queue so we don't incorrectly gc them.

Tested by: kris, pho

16 years agoo In preparation for basing a new driver on this one:
Marius Strobl [Sun, 30 Dec 2007 01:32:03 +0000 (01:32 +0000)]
o In preparation for basing a new driver on this one:
  - ANSIfy
  - try to bring closer to style(9)
  - remove banal comments.
o Add my copyright for having done lots of fixes and improvements.

16 years agoCorrect the comments in am7990_intr() and am79900_intr(); it's not
Marius Strobl [Sun, 30 Dec 2007 00:23:38 +0000 (00:23 +0000)]
Correct the comments in am7990_intr() and am79900_intr(); it's not
possible to end up in the interrupt handler again while processing the
previous RX interrupt in ifp->if_input() because the MD interrupt code
disables the delivery of the respective interrupt until all associated
handlers were called (in the INTR_FILTER case the MI code supposedly
does the same). Toggling the NIC interrupt enable bit in these handlers
still is necessary though as some chips (f.e. the VMware emulated one)
require this to be done in order to keep issuing interrupts.

MFC after: 1 month

16 years agoReplace explicit calls to video methods with their respective variants
Wojciech A. Koszek [Sat, 29 Dec 2007 23:26:59 +0000 (23:26 +0000)]
Replace explicit calls to video methods with their respective variants
implemented with macros. This patch improves code readability. Reasoning
behind vidd_* is a sort of "video discipline".

List of macros is supposed to be complete--all methods of video_switch
ought to have their respective macros from now on.

Functionally, this code should be no-op. My intention is to leave current
behaviour of touched code as is.

No objections: rwatson
Silence on: freebsd-current@
Approved by: cognet

16 years agoRemove explicit calls to keyboard methods with their respective variants
Wojciech A. Koszek [Sat, 29 Dec 2007 21:55:25 +0000 (21:55 +0000)]
Remove explicit calls to keyboard methods with their respective variants
implemented with macros. This patch improves code readability. Reasoning
behind kbdd_* is a "keyboard discipline".

List of macros is supposed to be complete--all methods of keyboard_switch
should have their respective macros from now on.

Functionally, this code should be no-op. My intention is to leave current
behaviour of code as is.

Glanced at by: rwatson
Reviewed by: emax, marcel
Approved by: cognet

16 years agoDocument new "AC-Name\Service-Name" connect syntax.
Alexander Motin [Sat, 29 Dec 2007 19:59:58 +0000 (19:59 +0000)]
Document new "AC-Name\Service-Name" connect syntax.

16 years agoAdd the superpage reservation system. This is "part 2 of 2" of the
Alan Cox [Sat, 29 Dec 2007 19:53:04 +0000 (19:53 +0000)]
Add the superpage reservation system.  This is "part 2 of 2" of the
machine-independent support for superpages.  (The earlier part was
the rewrite of the physical memory allocator.)  The remainder of the
code required for superpages support is machine-dependent and will
be added to the various pmap implementations at a later date.

Initially, I am only supporting one large page size per architecture.
Moreover, I am only enabling the reservation system on amd64.  (In
an emergency, it can be disabled by setting VM_NRESERVLEVELS to 0
in amd64/include/vmparam.h or your kernel configuration file.)

16 years agoAdd support for optional "AC-Name\Service-Name" syntax at NGM_PPPOE_CONNECT
Alexander Motin [Sat, 29 Dec 2007 19:44:41 +0000 (19:44 +0000)]
Add support for optional "AC-Name\Service-Name" syntax at NGM_PPPOE_CONNECT
argument. It allows ppp, mpd or any other node consumer to request
connection to specified access concentrator.

Proposed by: Alexander A. Burylov <burylov@mail.ru>

16 years agoComments fixing
Andrey A. Chernov [Sat, 29 Dec 2007 16:28:15 +0000 (16:28 +0000)]
Comments fixing
"month names" -> "months names"
    typo
"Long months names (alternative)" or "in alternative form" ->
"(without case ending)"
"Long months names" -> "Long months names (as in a date)"
    to not confuse developers on what purpose those sections are

16 years agoPlug the leaks in the present (hopefully, soon to be replaced)
Konstantin Belousov [Sat, 29 Dec 2007 14:28:01 +0000 (14:28 +0000)]
Plug the leaks in the present (hopefully, soon to be replaced)
implementation of the linux_openat() for the quick MFC.

Reported and tested by: Peter Holm
MFC after:      3 days

16 years agoApply the LCONVPATH() to the (old) linux_stat() and linux_lstat() syscalls.
Konstantin Belousov [Sat, 29 Dec 2007 14:25:29 +0000 (14:25 +0000)]
Apply the LCONVPATH() to the (old) linux_stat() and linux_lstat() syscalls.
Without it, code has two problems:
- behaviour of the old and new [l]stat are different with regard of
  the /compat/linux
- directly accessing the userspace data from the kernel asks for
  the panics.

Reported and tested by: Peter Holm
Reviewed by: rdivacky
MFC after: 3 days

16 years agoThe ffs_balloc() routines, whan allocating the indirect blocks for
Konstantin Belousov [Sat, 29 Dec 2007 13:31:27 +0000 (13:31 +0000)]
The ffs_balloc() routines, whan allocating the indirect blocks for
the inode, do the rollback in case the allocation failed (due to
insufficient free space or quota limits). But, the code does leaves the
buffers corresponding to the inoirect blocks on the vnode bufobj list.
This causes several assertion failures (for instance, "ffs_truncate3"
in ffs_truncate()) to fail, and could result in the indirect block
aliasing problem, like writing the context of such blocks to random
disk location.

Remove the buffers from the bufobj properly.

Reported and tested by: Peter Holm
Reviewed by: tegge
MFC after: 3 weeks

16 years agoSome systems need the types defined in sys/types.h, but lack the
Warner Losh [Sat, 29 Dec 2007 05:15:54 +0000 (05:15 +0000)]
Some  systems need  the types  defined  in sys/types.h,  but lack  the
sys/types.h polution  that FreeBSD  has in one  of its  include files.
Since  this  is  a  bootstrap  tool, include  more  than  is  strictly
necessary for FreeBSD.

16 years agoPlug a memory leak. Once any given package (e.g. perl) was installed
Ken Smith [Sat, 29 Dec 2007 04:56:07 +0000 (04:56 +0000)]
Plug a memory leak.  Once any given package (e.g. perl) was installed
we would leak a saved screen for every other package we tried to install
that listed perl as one of its dependencies.  When installing things
like gnome and kde that wound up being a LOT of leaked memory.

Insta-MFC request coming so this can be tested as part of 6.3-RC2...

Testing help from: kris

16 years agoAdjust the some error messages as suggested during re@ review, and
Ken Smith [Sat, 29 Dec 2007 04:52:51 +0000 (04:52 +0000)]
Adjust the some error messages as suggested during re@ review, and
adjust a comment that won't be true shortly.

16 years agoAdd asmc(4).
Rui Paulo [Fri, 28 Dec 2007 22:50:04 +0000 (22:50 +0000)]
Add asmc(4).

Requested by: njl (mentor)

16 years agoAttempt to reduce the rate of foot-shooting injuries by adding a new
Colin Percival [Fri, 28 Dec 2007 20:39:18 +0000 (20:39 +0000)]
Attempt to reduce the rate of foot-shooting injuries by adding a new
paragraph clarifying that portsnap does not behave the same way as
cvs and cvsup where local modifications are concerned.

Submitted by: peter
Feet shot: peter, kris, obrien, + many others

16 years agoList all environment variables supported by libfetch, along with a reference
Dag-Erling Smørgrav [Fri, 28 Dec 2007 19:47:37 +0000 (19:47 +0000)]
List all environment variables supported by libfetch, along with a reference
to the fetch(3) man page.

MFC after: 1 week

16 years agoAussie New Years wish
Wilko Bulte [Fri, 28 Dec 2007 17:57:25 +0000 (17:57 +0000)]
Aussie New Years wish

16 years agoBack out premature commit of previous version.
Jason Evans [Fri, 28 Dec 2007 09:21:12 +0000 (09:21 +0000)]
Back out premature commit of previous version.

16 years agoMaintain two trees instead of one (old_chunks --> old_chunks_{ad,szad}) in
Jason Evans [Fri, 28 Dec 2007 07:24:19 +0000 (07:24 +0000)]
Maintain two trees instead of one (old_chunks --> old_chunks_{ad,szad}) in
order to support re-use of multi-chunk unused regions within the DSS for
huge allocations.  This generalization is important to correct function
when mmap-based allocation is disabled.

Avoid zeroing re-used memory in the DSS unless it really needs to be
zeroed.

16 years agoImplement RB_PREV() AND RB_FOREACH_REVERSE().
Jason Evans [Fri, 28 Dec 2007 07:03:26 +0000 (07:03 +0000)]
Implement RB_PREV() AND RB_FOREACH_REVERSE().

16 years agoThe limit on datasize in the install environment is 128M. That's a bit
Ken Smith [Fri, 28 Dec 2007 05:08:54 +0000 (05:08 +0000)]
The limit on datasize in the install environment is 128M.  That's a bit
too small for today's standards.  While loading packages sysinstall
blows past this by a LOT but I think (hope...) that's caused by other
bugs.  I'll look more into why sysinstall's memory use has gotten so
out of control as it loads packages but independent of that there really
is no reason to leave the limits on datasize and stacksize in place.  And
they can cause problems for some of the things "modern packages" might
be doing via pkg_add which gets run by sysinstall and would inherit the
limits.

Another insta-MFC probably coming, this is holding up 6.3-RC2.  Sysinstall's
memory use is so out of control it blows past the current limit before it
finishes loading either of the meta-packages kde or gnome...

16 years agoRelease chunks_mtx for all paths through chunk_dealloc().
Jason Evans [Fri, 28 Dec 2007 02:15:08 +0000 (02:15 +0000)]
Release chunks_mtx for all paths through chunk_dealloc().

Reported by: kris

16 years agoIn "show lockedvnods" DDB command, use db_printf() rather than printf()
Robert Watson [Fri, 28 Dec 2007 00:47:31 +0000 (00:47 +0000)]
In "show lockedvnods" DDB command, use db_printf() rather than printf()
so that the results end up in the DDB output stream rather than the
console output stream.

This should likely also be done for the vprint() function it calls.

MFC after: 3 months