]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC: r198132
marius [Mon, 5 Sep 2011 12:36:10 +0000 (12:36 +0000)]
MFC: r198132

A small change to avoid calling gettimeofday() too often (hardwired to once
every 20us at most).

git-svn-id: svn://svn.freebsd.org/base/stable/8@225396 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224659, r224674 and r224765:
ed [Mon, 5 Sep 2011 11:08:33 +0000 (11:08 +0000)]
MFC r224659, r224674 and r224765:

  Remove NIS entries from /etc/nsswitch.conf for WITHOUT_NIS.

  We already modify various configuration files in /etc based on build
  configuration. This is not done for nsswitch.conf right now when setting
  WITHOUT_NIS. This breaks various utilities, including crond, that depend
  on working databases.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225395 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225167, r225329:
mm [Mon, 5 Sep 2011 09:49:28 +0000 (09:49 +0000)]
MFC r225167, r225329:

MFC r225167:
Import bugfix for reading and extracting of FreeBSD ISO images with tar.

Vendor revision 3645 (merge of 3642):
Change the mechanism handling a rr_moved directory,
which is Rockridge extension that can exceed the limitation of
a maximum directory depth of ISO 9660.
  - Stop reading all entries at a time.
  - Connect "CL" entry to "RE" entry dynamically, which "CL" and "RE"
    have information to rebuild a full directory tree.
  - Tweak some related tests since we use Headsort for re-ordering
    entries and it cannot make a steady order when the keies of
    the entries are the same.

http://code.google.com/p/libarchive/issues/detail?id=168

MFC r225329:
Import additional bugfix for reading and extracting makefs-created
ISO images with tar.

Vendor revision 3648 (merge of 3647):
Additional fix to issue 168 because the change of r3642 was not sufficient.
  - Make sure "CL" entry appear after its "RE" entry which the "CL" entry
    should be connected with.
  - Give consideration to the case that the top level "RE" entry has
    already been exposed outside before its tree.

Obtained from: libarchive (release/2.8, svn rev 3645, 3648)

git-svn-id: svn://svn.freebsd.org/base/stable/8@225392 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225076:
kib [Mon, 5 Sep 2011 08:41:57 +0000 (08:41 +0000)]
MFC r225076:
Apply the limit to avoid the overflows in the radix tree subr_blist.c
after the conversion of the swap device size to the page size units,
not before.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225388 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225330:
pluknet [Mon, 5 Sep 2011 07:57:56 +0000 (07:57 +0000)]
MFC r225330:

 Cosmetic cleanup: remove unused #define LIBMEMSTAT

git-svn-id: svn://svn.freebsd.org/base/stable/8@225386 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225234:
art [Mon, 5 Sep 2011 06:54:13 +0000 (06:54 +0000)]
MFC r225234:

Make sure RPC calls over UDP return RPC_INTR status if the process has
been interrupted in a restartable syscall. Otherwise we could end up
in an (almost) endless loop in clnt_reconnect_call().

PR: kern/160198
Reviewed by: rmacklem
Approved by: avg (mentor)

git-svn-id: svn://svn.freebsd.org/base/stable/8@225384 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225228
brueffer [Sun, 4 Sep 2011 14:28:06 +0000 (14:28 +0000)]
MFC: r225228

Remove broken link to supported wifi cards. There doesn't appear to
be an equivalent list anywhere else.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225374 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225215
brueffer [Sat, 3 Sep 2011 20:46:30 +0000 (20:46 +0000)]
MFC: r225215

Fix memory leaks in error cases.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225369 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225040:
kib [Sat, 3 Sep 2011 08:31:59 +0000 (08:31 +0000)]
MFC r225040:
Prevent the hiwatermark for the unix domain socket from becoming
effectively negative. Often seen as upstream fastcgi connection timeouts
in nginx when using sendfile over unix domain sockets for communication.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225365 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoinsta-mfh r225359: cosmetic nit in usage string.
des [Sat, 3 Sep 2011 03:13:35 +0000 (03:13 +0000)]
insta-mfh r225359: cosmetic nit in usage string.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225360 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225049
rmacklem [Sat, 3 Sep 2011 01:45:37 +0000 (01:45 +0000)]
MFC: r225049
Fix the NFSv4 server so that it returns NFSERR_SYMLINK when
an attempt to do an Open operation on any type of file other
than VREG is done. A recent discussion on the IETF working group's
mailing list (nfsv4@ietf.org) decided that NFSERR_SYMLINK
should be returned for all non-regular files and not just symlinks,
so that the Linux client would work correctly.
This change does not affect the FreeBSD NFSv4 client and is not
believed to have a negative effect on other NFSv4 clients.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225358 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225229
marius [Fri, 2 Sep 2011 16:17:52 +0000 (16:17 +0000)]
MFC: r225229

Since r221218 (MFC'ed to stable/8 in r223500) rman_manage_region(9)
actually honors rm_start and rm_end which may cause problems when these
contain garbage so zero the range descriptors embedding the rmans when
allocating them.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225332 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226155:
mm [Fri, 2 Sep 2011 08:19:19 +0000 (08:19 +0000)]
MFC r226155:

Generalize ffs_pages_remove() into vn_pages_remove().

Remove mapped pages for all dataset vnodes in zfs_rezget() using
new vn_pages_remove() to fix mmapped files changed by
zfs rollback or zfs receive -F.

PR: kern/160035, kern/156933

git-svn-id: svn://svn.freebsd.org/base/stable/8@225326 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r207662 (trasz):
mm [Fri, 2 Sep 2011 07:37:55 +0000 (07:37 +0000)]
MFC r207662 (trasz):
Move checking against RLIMIT_FSIZE into one place, vn_rlimit_fsize().

git-svn-id: svn://svn.freebsd.org/base/stable/8@225320 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH 221143, 221144: whitespace
des [Thu, 1 Sep 2011 19:39:10 +0000 (19:39 +0000)]
MFH 221143, 221144: whitespace
MFH 221232: make "-f" optional

git-svn-id: svn://svn.freebsd.org/base/stable/8@225316 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225140:
mav [Thu, 1 Sep 2011 15:53:59 +0000 (15:53 +0000)]
MFC r225140:
Add ID for ASMedia ASM1061 2-port PCIe 2.0 x1 6Gb/s SATA controller.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225312 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r221107, r221108: alphabetize command-line options
des [Wed, 31 Aug 2011 16:25:34 +0000 (16:25 +0000)]
MFH r221107, r221108: alphabetize command-line options
MFH r221233: add -E option (BIO_DELETE unused blocks)

git-svn-id: svn://svn.freebsd.org/base/stable/8@225296 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225057:
attilio [Wed, 31 Aug 2011 09:14:56 +0000 (09:14 +0000)]
MFC r225057:
Fix a race that can happen when switching spinlocks in
callout_cpu_switch() and curthread is preempted.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225288 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225104:
ae [Wed, 31 Aug 2011 06:47:39 +0000 (06:47 +0000)]
MFC r225104:
  Fix lock leak.

  Reported by: Alex Lyashkov

git-svn-id: svn://svn.freebsd.org/base/stable/8@225282 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 225142:
gjb [Wed, 31 Aug 2011 01:17:49 +0000 (01:17 +0000)]
MFC 225142:

Reword sentence noting UPDATING entries prior to October 2007[1] are
only available in older FreeBSD releases.

PR: 159220

[1] - October 2007 is specific to HEAD.  In stable/8 and stable/7,
the correct year is 2004, so that change is reflected here as well.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225275 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225088:
yongari [Tue, 30 Aug 2011 17:20:34 +0000 (17:20 +0000)]
MFC r225088:
  Disable PHY hibernation until I get more detailed hibernation
  programming secret.  The PHY would go into sleep state when it
  detects no established link and it will re-establish link when the
  cable is plugged in.  Previously it failed to re-establish link
  when the cable is plugged in such that it required to manually down
  and up the interface again to make it work.  This came from
  incorrectly programmed hibernation parameters.  According to
  Atheros, each PHY chip requires different configuration for
  hibernation and different vendor has different settings for the
  same chip.
  Disabling hibernation may consume more power but establishing link
  looks more important than saving power.
  Special thanks to Atheros for giving me instructions that disable
  hibernation.

  PR: kern/148772

git-svn-id: svn://svn.freebsd.org/base/stable/8@225268 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224915:
kib [Tue, 30 Aug 2011 11:50:28 +0000 (11:50 +0000)]
MFC r224915:
Do not return success and a string "unknown" when vn_fullpath() was unable
to resolve the path of the text vnode of the process. The behaviour is
very confusing for any consumer of the procfs, in particular, java.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225261 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225122:
marck [Tue, 30 Aug 2011 11:47:36 +0000 (11:47 +0000)]
MFC r225122:

 Add kern.cam.boot_delay description (with reasonable default) to
 default/loader.conf

 This should help people installing ${OS} to USB devices, where there are
 frequently cases where kernel tries to mount root before actual umass sensing
 is finished.

Reviewed by: mav
Approved by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/8@225259 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225120:
delphij [Tue, 30 Aug 2011 01:25:12 +0000 (01:25 +0000)]
MFC r225120:

Honor WITHOUT_IPX when installing etc/rc.d/ipxrouted.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225121:
mm [Mon, 29 Aug 2011 20:00:29 +0000 (20:00 +0000)]
MFC r225121:

Fix buffer overflow and possible ISO image corruption in wrong
handling of "." character case in makefs ISO level 1 and 2 filename
conversion.

Filed as NetBSD PR #45285
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45285

Reviewed by: Christos Zoulas <christos@netbsd.org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@225249 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221096 (by obrien):
kib [Mon, 29 Aug 2011 10:29:05 +0000 (10:29 +0000)]
MFC r221096 (by obrien):
Reap old SPL comments.

MFC r225089:
Update some comments in swap_pager.c.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225244 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225037 and r225041:
hselasky [Sat, 27 Aug 2011 14:03:27 +0000 (14:03 +0000)]
MFC r225037 and r225041:
Add new USB IDs.

PR: usb/159919, usb/159836

git-svn-id: svn://svn.freebsd.org/base/stable/8@225213 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225018:
mav [Fri, 26 Aug 2011 10:39:33 +0000 (10:39 +0000)]
MFC r225018:
Fix WWN printing in `camcontrol identify` output.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225188 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225000:
hselasky [Fri, 26 Aug 2011 07:38:40 +0000 (07:38 +0000)]
MFC r225000:
USB clear stall fix for VM's.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225186 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225003:
ae [Fri, 26 Aug 2011 04:58:33 +0000 (04:58 +0000)]
MFC r225003:
  Add new section "BOOTSTRAPPING" to the gpart(8), that describes
  bootstrap code images used to boot from MBR, GPT, BSD and VTOC8
  schemes.

MFC r225023:
  o Fix mdoc formatting for the '.Fx' macro. [1]
  o Add information about APM scheme and fix typos. [2]

  Submitted by: gjb [1], nwhitehorn [2]

git-svn-id: svn://svn.freebsd.org/base/stable/8@225185 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225015
marius [Tue, 23 Aug 2011 14:37:39 +0000 (14:37 +0000)]
MFC: r225015

Revert r224157 (MFC'ed to stable/8 in r224401), re-enabling r222135 (MFC'ed
to stable/8 in r222371). The underlying problem keeping the latter from
working as expected was fixed in r225014 (MFC'ed to stable/8 in r225116).

git-svn-id: svn://svn.freebsd.org/base/stable/8@225118 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r225014
marius [Tue, 23 Aug 2011 14:32:53 +0000 (14:32 +0000)]
MFC: r225014

r221812 (MFC'ed to stable/8 in r222159) reveals that at least some Broadcom
PHYs default to being not only isolated but also powered down after a reset
and while they just work fine [sic] when both is the case they don't if they
are only deisolate but still powered down. So in order to put PHYs in an
overall normal operation mode for the common case, ensure in mii_phy_reset()
that they are not powered down after a reset. Unfortunately, this only helps
in case of BCM5421, while BCM5709S apparently only work when they remain
isolated and powered down after a reset. So don't call mii_phy_reset() in
brgphy_reset() and implement the reset locally leaving the problematic bits
alone. Effectively this bypasses r221812 for brgphy(4).
Thanks to Justin Hibbits for doing a binary search in order to identify
the problematic commit.

PR: 157405, 158156
Reviewed by: yongari (mii_phy_reset() part)

git-svn-id: svn://svn.freebsd.org/base/stable/8@225116 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223688
marius [Tue, 23 Aug 2011 14:00:01 +0000 (14:00 +0000)]
MFC: r223688

Add detection for the Marvel 88E1149R and treat it just like the
88E1149.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225114 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225009:
attilio [Tue, 23 Aug 2011 09:42:29 +0000 (09:42 +0000)]
MFC r225009:
Bump coretemp tollerable limit to 110 degrees.

Sponsored by: Sandvine Incorporated

git-svn-id: svn://svn.freebsd.org/base/stable/8@225105 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r225038:
hselasky [Tue, 23 Aug 2011 07:42:04 +0000 (07:42 +0000)]
MFC r225038:
Fix for recursive locking in usb_close() after r224777 (9-current) and r224960 (8-stable).

git-svn-id: svn://svn.freebsd.org/base/stable/8@225103 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224903, r224917, r225035, r225090, r225091:
hselasky [Tue, 23 Aug 2011 07:35:21 +0000 (07:35 +0000)]
MFC r224903, r224917, r225035, r225090, r225091:
- Add missing API function to the LibUSB v1.0 API.
- Update LibUSB v1.0 manual page.

PR: docs/159898

git-svn-id: svn://svn.freebsd.org/base/stable/8@225102 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224791:
pjd [Tue, 23 Aug 2011 07:00:51 +0000 (07:00 +0000)]
MFC r224791:

Eliminate the zfsdev_state_lock entirely and replace it with the
spa_namespace_lock. This fixes LOR between the spa_namespace_lock and
spa_config lock. LOR can cause deadlock on vdevs removal/insertion.

Reported by: gibbs, delphij
Tested by: delphij

git-svn-id: svn://svn.freebsd.org/base/stable/8@225100 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 224495:
jhb [Mon, 22 Aug 2011 18:57:59 +0000 (18:57 +0000)]
MFC 224495:
Properly initialize an error variable to avoid returning uninitialized
data when 'show drives' succeeds, often resulting in a failing exit code
even though the command worked fine.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225084 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 224898: Add device id for the Moxa CP-112UL dual-port serial adapters.
jhb [Mon, 22 Aug 2011 18:46:02 +0000 (18:46 +0000)]
MFC 224898: Add device id for the Moxa CP-112UL dual-port serial adapters.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225082 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 224986:
jhb [Mon, 22 Aug 2011 18:41:39 +0000 (18:41 +0000)]
MFC 224986:
One of the general principles of the sysctl(3) API is that a user can
query the needed size for a sysctl result by passing in a NULL old
pointer and a valid oldsize.  The kern.proc.args sysctl handler broke
this assumption by not calling SYSCTL_OUT() if the old pointer was NULL.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225080 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224865: tail: Fix crash if -F'ed file's filesystem disappears.
jilles [Sun, 21 Aug 2011 20:59:51 +0000 (20:59 +0000)]
MFC r224865: tail: Fix crash if -F'ed file's filesystem disappears.

If tail notices that a file it is following no longer exists (because stat()
fails), it will output any final lines and then close the file. If the read
operation also causes an error, such as when the filesystem is forcefully
unmounted, it closes the file as well, leading to fclose(NULL) and a
segmentation fault.

PR: bin/159750

git-svn-id: svn://svn.freebsd.org/base/stable/8@225067 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224527: smp_rendezvous: master cpu should wait until all slaves are
avg [Sat, 20 Aug 2011 11:50:02 +0000 (11:50 +0000)]
MFC r224527: smp_rendezvous: master cpu should wait until all slaves are
fully done

git-svn-id: svn://svn.freebsd.org/base/stable/8@225028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224632: fix a serious bug in libproc's proc_attach
avg [Sat, 20 Aug 2011 11:47:11 +0000 (11:47 +0000)]
MFC r224632: fix a serious bug in libproc's proc_attach

PR: bin/158431

git-svn-id: svn://svn.freebsd.org/base/stable/8@225027 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224529: fix a typo/tautology in the release documentation
avg [Sat, 20 Aug 2011 11:44:48 +0000 (11:44 +0000)]
MFC r224529: fix a typo/tautology in the release documentation

git-svn-id: svn://svn.freebsd.org/base/stable/8@225026 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224814, r224855:
mm [Sat, 20 Aug 2011 07:43:10 +0000 (07:43 +0000)]
MFC r224814, r224855:

MFC r224814 [1]:
Fix race between dmu_objset_prefetch() invoked from
zfs_ioc_dataset_list_next() and dsl_dir_destroy_check() indirectly
invoked from dmu_recv_existing_end() via dsl_dataset_destroy() by not
prefetching temporary clones, as these count as always inconsistent.
In addition, do not prefetch hidden datasets at all as we are not
going to process these later.

Filed as Illumos Bug #1346

MFC r224855:
zfs_ioctl.c: improve code readability in zfs_ioc_dataset_list_next()

zvol.c: fix calling of dmu_objset_prefetch() in zvol_create_minors()
by passing full instead of relative dataset name and prefetching all
visible datasets to be processed later instead of just the pool name

PR: kern/157728 [1]
Tested by: Borja Marcos <borjam@sarenet.es> [1], mm
Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@225022 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC:
vanhu [Fri, 19 Aug 2011 13:41:00 +0000 (13:41 +0000)]
MFC:
fixed two race conditions when inserting/removing SAs via PFKey,
which can both lead to a kernel panic when adding/removing quickly
a lot of SAs.

Obtained from: NETASQ

git-svn-id: svn://svn.freebsd.org/base/stable/8@225011 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: revision 224780
nyan [Fri, 19 Aug 2011 12:08:15 +0000 (12:08 +0000)]
MFC: revision 224780

  Allow to build a release for stable/[78] on a current box and vise versa.

git-svn-id: svn://svn.freebsd.org/base/stable/8@225005 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: Release SP's refcount in key_get_spdbyid().
vanhu [Fri, 19 Aug 2011 09:06:00 +0000 (09:06 +0000)]
MFC: Release SP's refcount in key_get_spdbyid().

PR: 156676
Submitted by: Tobias Brunner (tobias@strongswan.org)

git-svn-id: svn://svn.freebsd.org/base/stable/8@225001 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224905:
delphij [Fri, 19 Aug 2011 01:11:06 +0000 (01:11 +0000)]
MFC r224905:

Update arcmsr(4) to 1.20.00.22 to solve recursive acquisition of buffer
mutex, which would lead to a deadlock.

Many thanks to Areca for their continued support of FreeBSD.

Submitted by: Ching Huang <ching2048 areca com tw>
Tested by: Willem Jan Withagen <wjw digiware nl>

git-svn-id: svn://svn.freebsd.org/base/stable/8@224991 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224777:
hselasky [Thu, 18 Aug 2011 08:25:27 +0000 (08:25 +0000)]
MFC r224777:
Use synchronous device destruction instead of asynchronous.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224960 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224605:
mm [Thu, 18 Aug 2011 07:34:11 +0000 (07:34 +0000)]
MFC r224605:
Fix panic in zfs_read() if IO_SYNC flag supplied by checking for
zfsvfs->z_log before calling zil_commit(). [1]
Do not call zfs_read() from zfs_getextattr() with the IO_SYNC flag.

Submitted by: Alexander Zagrebin <alex@zagrebin.ru> [1]
Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@224959 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224637:
zack [Thu, 18 Aug 2011 00:05:09 +0000 (00:05 +0000)]
MFC r224637:

Fix an NFS server issue where it was not correctly setting the eof flag when a
READ had hit the end of the file. Also, clean up some cruft in the code.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224953 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224606
rmacklem [Wed, 17 Aug 2011 20:55:56 +0000 (20:55 +0000)]
MFC: r224606
Fix a LOR in the NFS client which could cause a deadlock.
This was reported to the mailing list freebsd-net@freebsd.org
on July 21, 2011 under the subject "LOR with nfsclient sillyrename".
The LOR occurred when nfs_inactive() called vrele(sp->s_dvp)
while holding the vnode lock on the file in s_dvp. This patch
modifies the client so that it performs the vrele(sp->s_dvp)
as a separate task to avoid the LOR. This fix was discussed
with jhb@ and kib@, who both proposed variations of it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224951 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224604
rmacklem [Wed, 17 Aug 2011 20:43:59 +0000 (20:43 +0000)]
MFC: r224604
Fix a LOR in the NFS client which could cause a deadlock.
This was reported to the mailing list freebsd-net@freebsd.org
on July 21, 2011 under the subject "LOR with nfsclient sillyrename".
The LOR occurred when nfs_inactive() called vrele(sp->s_dvp)
while holding the vnode lock on the file in s_dvp. This patch
modifies the client so that it performs the vrele(sp->s_dvp)
as a separate task to avoid the LOR. This fix was discussed
with jhb@ and kib@, who both proposed variations of it.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224950 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge r211908 from head (originally by jfv):
gavin [Wed, 17 Aug 2011 17:04:43 +0000 (17:04 +0000)]
Merge r211908 from head (originally by jfv):

  Add Intel Cougar Point PCH LPC Controller Device IDs
  for watchdog support. Also add additional Intel Ibex
  Peak (5 Series/3400 Series) PCH IDs.

PR: kern/159800

git-svn-id: svn://svn.freebsd.org/base/stable/8@224948 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r219038: Document the input line length limit.
jh [Wed, 17 Aug 2011 15:24:25 +0000 (15:24 +0000)]
MFC r219038: Document the input line length limit.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224946 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218411:
jh [Wed, 17 Aug 2011 15:22:58 +0000 (15:22 +0000)]
MFC r218411:

- Use LINE_MAX from limits.h as the maximum line length instead of
  BUFSIZ. Use LINE_MAX * 2 as the buffer size (BSIZE).
- Error out if we encounter a line longer than LINE_MAX. The previous
  behavior was to silently split long lines and produce corrupted
  output.

PR: bin/151384

git-svn-id: svn://svn.freebsd.org/base/stable/8@224945 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218410: Handle EOF when skipping lines.
jh [Wed, 17 Aug 2011 15:19:25 +0000 (15:19 +0000)]
MFC r218410: Handle EOF when skipping lines.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224944 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224728:
mav [Tue, 16 Aug 2011 10:52:29 +0000 (10:52 +0000)]
MFC r224728:
Do not block zero report ID. It is correct value for devices with single
ID. This fixes USB_SET_IMMED call (synchronous operation) of the uhid(4)
driver on devices with single report ID.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224908 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224743:
kib [Tue, 16 Aug 2011 08:41:09 +0000 (08:41 +0000)]
MFC r224743:
Do not update mountpoint generation counter to the value which was not
yet acted upon by devfs_populate().

git-svn-id: svn://svn.freebsd.org/base/stable/8@224904 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224506:
yongari [Mon, 15 Aug 2011 17:08:54 +0000 (17:08 +0000)]
MFC r224506:
  Add new device id of D-Link DGE-530T Rev. C controller.  DGE-503T
  Rev A1 and B1 is supported by sk(4) but the DGE-530T Rev. C
  controller is re-branded RealTek 8169 controller.

  PR: kern/159116

git-svn-id: svn://svn.freebsd.org/base/stable/8@224891 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224511:
mav [Mon, 15 Aug 2011 14:19:26 +0000 (14:19 +0000)]
MFC r224511:
 - Fix usbhidctl and usbhidaction to handle HID devices with multiple
report ids, such as multimedia keyboards.
 - Add collection type and report id to the `usbhidctl -r` output. They
are important for proper device understanding and debugging.
 - Fix usbhidaction tool to properly handle items having report_count
more then 1.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224886 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224582:
kib [Mon, 15 Aug 2011 09:26:53 +0000 (09:26 +0000)]
MFC r224582:
Implement the linprocfs swaps file.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224878 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224554
rmacklem [Sun, 14 Aug 2011 00:55:18 +0000 (00:55 +0000)]
MFC: r224554
Fix rename in the new NFS server so that it does not require a
recursive vnode lock on the directory for the case where the
new file name is in the same directory as the old one. The patch
handles this as a special case, recognized by the new directory
having the same file handle as the old one and just VREF()s the old
dir vnode for this case, instead of doing a second VFS_FHTOVP() to get it.
This is required so that the server will work for file systems like
msdosfs, that do not support recursive vnode locking.
This problem was discovered during recent testing by pho@
when exporting an msdosfs file system via the new NFS server.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224860 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224532
rmacklem [Sun, 14 Aug 2011 00:32:43 +0000 (00:32 +0000)]
MFC: r224532
The new NFS client failed to vput() the new vnode if a setattr
failed after the file was created in nfs_create(). This would
probably only happen during a forced dismount. The old NFS client
does have a vput() for this case. Detected by pho during recent
testing, where an open syscall returned with a vnode still locked.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224858 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r222716: sh: Fix $? in heredocs on simple commands.
jilles [Sat, 13 Aug 2011 21:33:50 +0000 (21:33 +0000)]
MFC r222716: sh: Fix $? in heredocs on simple commands.

The patch is slightly different because redirected compound commands are
handled differently in stable/8 (no separate function, redirection errors
are fatal).

PR: bin/41410

git-svn-id: svn://svn.freebsd.org/base/stable/8@224854 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224079 and r224121:
zack [Sat, 13 Aug 2011 17:29:37 +0000 (17:29 +0000)]
MFC r224079 and r224121:

r224121 was meant to revert r224079, except I accidentally checked in an
additional ACL patch in r224121. Committing both of these ends up with just the
ACL fix. Here is the real commit note for the ACL patch:

Running pynfs verify/nverify tests produces a panic in nfsrv_compareacl(). This
patch fixes the panic.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224853 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224086:
zack [Sat, 13 Aug 2011 17:21:50 +0000 (17:21 +0000)]
MFC r224086:

Add DEXITCODE plumbing to NFS.

Isilon has the concept of an in-memory exit-code ring that saves the last exit
code of a function and allows for stack tracing. This is very helpful when
debugging tough issues.

This patch is essentially a no-op for BSD at this point, until we upstream
the dexitcode logic itself. The patch adds DEXITCODE calls to every NFS
function that returns an errno error code. A number of code paths were also
reorganized to have single exit paths, to reduce code duplication.

Submitted by:   David Kwan <dkwan@isilon.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@224851 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 224084
zack [Sat, 13 Aug 2011 17:20:00 +0000 (17:20 +0000)]
MFC: 224084

Add a small comment about unloading the kgsappi module.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224850 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224083
zack [Sat, 13 Aug 2011 17:19:24 +0000 (17:19 +0000)]
MFC: r224083

Simple find/replace of VOP_ISLOCKED -> NFSVOPISLOCKED. This is done so that
NFSVOPISLOCKED can be modified later to add enhanced logging and assertions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224849 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 224082
zack [Sat, 13 Aug 2011 17:18:45 +0000 (17:18 +0000)]
MFC: 224082

Simple find/replace of VOP_UNLOCK -> NFSVOPUNLOCK. This is done so that
NFSVOPUNLOCK can be modified later to add enhanced logging and assertions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224848 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 224081
zack [Sat, 13 Aug 2011 17:17:59 +0000 (17:17 +0000)]
MFC: 224081

Simple find/replace of vn_lock -> NFSVOPLOCK. This is done so that NFSVOPLOCK
can be modified later to add enhanced logging and assertions.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224847 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 224080
zack [Sat, 13 Aug 2011 17:17:06 +0000 (17:17 +0000)]
MFC: 224080

Remove unnecessary thread pointer from VOPLOCK macros and current users.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224846 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: 224078
zack [Sat, 13 Aug 2011 17:16:06 +0000 (17:16 +0000)]
MFC: 224078
  Move nfsvno_pathconf to be accessible to sys/fs/nfs; no functionality change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224844 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224077
zack [Sat, 13 Aug 2011 17:08:57 +0000 (17:08 +0000)]
MFC: r224077
  Small acl patch to return the aclerror that comes back from
  nfsrv_dissectacl().  This fixes a problem where ATTRNOTSUPP was being
  returned instead of BADOWNER.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224843 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r221466, r221494 (partial), r224652
marius [Sat, 13 Aug 2011 13:18:39 +0000 (13:18 +0000)]
MFC: r221466, r221494 (partial), r224652

Change several archs to use makefs (from base) instead of mkisofs (from
ports) which makes release CD generation both faster and self-hosting.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224837 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224762
marius [Sat, 13 Aug 2011 13:15:27 +0000 (13:15 +0000)]
MFC: r224762

Sync makefs(8) ISO 9660 support with NetBSD:
o cd9960 -> cd9660
o Move inclusion of sys/endian.h from cd9660_eltorito.c to cd9660.h
  since actual user is not cd9660_eltorito.c but iso.h and
  cd9660_eltorito.h.

  Actually, include order/place of sys/endian.h doesn't matter on
  netbsd since it is always included by sys/types.h but it's not
  true on other system.  This should fix cross build breakage on
  freebsd introduced by rev. 1.16 of cd9660_eltorito.c.
  Problem reported and fix suggested on twitter.
o Fix fd leaks in error cases. Found by cppcheck.
o RRIP RE length should be 4, not 0
o Apply fixes for PR bin/44114 (makefs(8) -t cd9660 -o rockridge creates
  corrupted cd9660fs), iso9660_rrip.c part:
  - cd9660_rrip_finalize_node() should check rr_real_parent in node->parent,
    not in node itself in RRIP_PL case
  - cd9660_rrip_initialize_node() should update only node passed as arg
    so handle RRIP_PL in DOTDOT case

  Fixes malformed dotdot entries in deep (more than 8 level) directories
  moved into .rr_moved dir.

  Should be pulled up to netbsd-5.
  (no official ISO has such deep dirs, but cobalt restorecd is affected)

Reviewed by: mm
Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@224835 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224687
marius [Sat, 13 Aug 2011 13:09:43 +0000 (13:09 +0000)]
MFC: r224687

Compile fbsd-threads.c. Amongst others this is necessary for a working
kgdb(1).

PR: 158719
Reviewed by: marcel

git-svn-id: svn://svn.freebsd.org/base/stable/8@224832 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224686
marius [Sat, 13 Aug 2011 12:57:48 +0000 (12:57 +0000)]
MFC: r224686

Implement functions necessary for compiling fbsd-threads.c.

Reviewed by: marcel

git-svn-id: svn://svn.freebsd.org/base/stable/8@224830 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224685
marius [Sat, 13 Aug 2011 12:50:38 +0000 (12:50 +0000)]
MFC: r224685

Implement

Reviewed by: marcel

git-svn-id: svn://svn.freebsd.org/base/stable/8@224828 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224684
marius [Sat, 13 Aug 2011 12:49:00 +0000 (12:49 +0000)]
MFC: r224684

Use the size of struct fpreg rather than of the pointer to it when copying
the FPU state.

Reviewed by: marcel

git-svn-id: svn://svn.freebsd.org/base/stable/8@224826 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224683, r224693
marius [Sat, 13 Aug 2011 12:47:09 +0000 (12:47 +0000)]
MFC: r224683, r224693

The tid member of struct pthread actually is long so read it as such.
Accessing it as an int causes failure on big-endian LP64, i.e. mips64be,
powerpc64 and sparc64.

Reviewed by: marcel

git-svn-id: svn://svn.freebsd.org/base/stable/8@224824 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224682
marius [Sat, 13 Aug 2011 12:43:33 +0000 (12:43 +0000)]
MFC: r224682

- Merge from r147740:
  When the last, possibly partially filled buffer is flushed, we didn't
  reset fragsz to 0 and as such would stop reflecting reality.
- Use __FBSDID.
- Wrap a too long line.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224822 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224494, r224761
marius [Sat, 13 Aug 2011 12:37:22 +0000 (12:37 +0000)]
MFC: r224494, r224761

- Send the RELSIM_ADJUST_OPENINGS in response to a MPI_EVENT_QUEUE_FULL using
  the right SIM in case the HBA is RAID-capable but the target in question is
  not a hot spare or member of a RAID volume.
- Report the loss and addition of SAS and SATA targets detected via PHY link
  status changes and signalled by MPI_EVENT_SAS_DEVICE_STATUS_CHANGE to cam(4)
  as lost devices and trigger rescans as appropriate. Without this it can take
  quite some time until a lost device actually is no longer tried to be used,
  if it ever stops. [1]
- Handle MPI_EVENT_IR2, MPI_EVENT_LOG_ENTRY_ADDED, MPI_EVENT_SAS_DISCOVERY
  and MPI_EVENT_SAS_PHY_LINK_STATUS silently as these serve no additional
  purpose beyond adding cryptic entries to logs.
- Add a warning for MPI_EVENT_SAS_DISCOVERY_ERROR events, which can help
  identifying broken disks. [2]

Thanks to Hans-Joerg Sirtl for providing one of the HBAs these changes were
developed with and RIP to the mainboard that didn't survive testing them.

PR: 157534 [1]
Submitted by: Andrew Boyer [2]

git-svn-id: svn://svn.freebsd.org/base/stable/8@224820 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r224493
marius [Sat, 13 Aug 2011 12:33:06 +0000 (12:33 +0000)]
MFC: r224493

- Staticize functions as appropriate and comment out unused ones.
- Sprinkle some const where appropriate.
- Consistently use target_id_t for the target parameter of mpt_map_physdisk()
  and mpt_is_raid_volume().
- Fix some whitespace bugs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224818 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r223985
marius [Sat, 13 Aug 2011 12:28:58 +0000 (12:28 +0000)]
MFC: r223985

- For SAS but neither FC nor SPI controllers default to using MSI/MSI-X
  (still allowing their use to be disabled via device hints though). This
  matches what the corresponding Linux driver provided by LSI does. Tested
  with SAS1064.
- There's no need to keep track of the RIDs used.
- Don't allocate MSI/MSI-X as RF_SHAREABLE.
- Remove a comment which no longer applies since r209599 (MFC'ed to stable/8
  in r210376).
- Assign NULL rather than 0 to pointers.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224816 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224001:
delphij [Sat, 13 Aug 2011 00:56:42 +0000 (00:56 +0000)]
MFC r224001:

Use prototype.  While I'm there, add a pair of parenthesis to mark an if
statment's border.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224809 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224726:
dougb [Fri, 12 Aug 2011 21:40:24 +0000 (21:40 +0000)]
MFC r224726:

Make clear that the -U option can be dangerous.

In -p mode install the group file with the same permissions as normally
done in etc/Makefile.

Update the copyright.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224807 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224650:
emaste [Thu, 11 Aug 2011 02:50:18 +0000 (02:50 +0000)]
MFC r224650:
  Don't try to free() an address returned by mmap().  This appears to be
  triggered by the same .o being included twice on the command line.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224771 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223926:
delphij [Wed, 10 Aug 2011 08:55:46 +0000 (08:55 +0000)]
MFC r223926:

peeraddr is only used in sizeof() evaluations, so instead of declaring it
a variable, use typedef.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224756 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223925:
delphij [Wed, 10 Aug 2011 08:54:35 +0000 (08:54 +0000)]
MFC r223925:

Use %zu when printing size_t.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224755 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223924:
delphij [Wed, 10 Aug 2011 08:53:33 +0000 (08:53 +0000)]
MFC r223924:

Match size_t and ssize_t by using %zu and %zd instead of %d.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224754 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223922:
delphij [Wed, 10 Aug 2011 08:52:27 +0000 (08:52 +0000)]
MFC r223922:

Use strlcpy().

git-svn-id: svn://svn.freebsd.org/base/stable/8@224753 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224691, r224700 [1]:
mm [Wed, 10 Aug 2011 08:40:59 +0000 (08:40 +0000)]
MFC r224691, r224700 [1]:

MFC r224961:
Add compatibility for ISO images created with unfixed makefs that
violated ECMA-119 (ISO9660): allow reserved4 to be 0x20 in PVD.
This allows tar to read FreeBSD distribution ISO images created
with makefs prior to NetBSD bin/45217 bugfix (up to 9.0-BETA1).

In addition, merge following important bugfixes from
libarchive's release/2.8 branch:

Revision 2812:
Merge 2811 from trunk:  Don't try to verify that compression-level=0
produces larger results than the default compression, since this isn't
true for all versions of liblzma.

Revision 2817:
Merge 2814 from trunk: Fix Issue 121 (mtree parser error)
http://code.google.com/p/libarchive/issues/detail?id=121

Revision 2820:
Fix issue 119.
Change the file location check that a file location does not exceed
volume block. New one is that a file content does not exceed volume
block(end of an ISO image). It is better than previous check even
if the issue did not happen.

While reading an ISO image generated by an older version of mkisofs
utility, a file location indicates the end the ISO image if its file
size is zero and it is the last file of all files of the ISO image,
so it is possible that the location value is the same as the number
of the total block of the ISO image.

http://code.google.com/p/libarchive/issues/detail?id=119

Revision 2955:
Issue 134:  Fix libarchive 2.8 crashing in archive_write_finish() when
the open has failed and we're trying to write Zip format.

http://code.google.com/p/libarchive/issues/detail?id=134

Revision 2958:
Followup on Issue 134:
 1) Port test_open_failure to libarchive 2.8 branch to test
    the problem reported in Issue 134.
    This test also shows that archive_read_open() sometimes
    fails to report open errors correctly.
 2) Fix the bug in archive_read.c
 3) Comment out the tests that close functions are invoked
    promptly when open fails; that's fully fixed in libarchive 3.0,
    but I don't think it's worth fixing here.

Revision 3484:
Use uintmax_t with %ju

Revision 3487:
Fix issue 163.
Correctly allocate enough memory for a input buffer saved.

http://code.google.com/p/libarchive/issues/detail?id=163

Revision 3542:
Merge 2516, 2536 from trunk:  Allow path table offset values of
0 and 18, which are used by some ISO writers.

MFC r224700 [1]:
Merge revision 3554 from libarchive's release/2.8 branch:

Partial merge of 2431 from trunk:  Retry writes on EINTR.
This should fix the SIGINT handler in bsdtar.
Note:  The rest of r2431 can't be merged, since it interacts
with a big write-side rearchitecture.

PR: bin/149409 [1]
Reviewed by: kientzle

git-svn-id: svn://svn.freebsd.org/base/stable/8@224752 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoRemove svn:mergeinfo from files under usr.sbin/makefs
mm [Wed, 10 Aug 2011 08:33:45 +0000 (08:33 +0000)]
Remove svn:mergeinfo from files under usr.sbin/makefs

This is a direct commit to stable/8

git-svn-id: svn://svn.freebsd.org/base/stable/8@224750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224690:
mm [Wed, 10 Aug 2011 08:21:39 +0000 (08:21 +0000)]
MFC r224690:

Fix NetBSD PR bin/44114:
makefs with -t cd9660 -o rockridge against directories with
deep structure creates a corrupted cd9660 image.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=44114

Fix NetBSD PR bin/45217:
makefs creates ISO9660 images that violate the ECMA-119 (ISO9660)
specification. This is caused by erroneously writing 32 bytes
with value 0x20 to the volume_set_id field and 128 bytes with value 0x20
to the the following 37-byte fields in the PVD:
copyright_file_id, abstract_file_id, bibliographic_file_id

This causes, among other unwanted results the reserved4 field to be
overwritten with the value 0x20. To comply with the specification,
this field muse be zero. As a result, all FreeBSD distribution
ISO images created with makefs have not been 100% valid ISO9660 files.

http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45217

Reviewed by: kientzle
Obtained from: NetBSD

git-svn-id: svn://svn.freebsd.org/base/stable/8@224748 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224673:
dougb [Tue, 9 Aug 2011 20:41:43 +0000 (20:41 +0000)]
MFC r224673:

Put information about supported-but-deprecated headers in comments

git-svn-id: svn://svn.freebsd.org/base/stable/8@224741 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r208027:
dougb [Tue, 9 Aug 2011 20:38:21 +0000 (20:38 +0000)]
MFC r208027:

mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to the
bottom of the manpages and order them consistently.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224672:
dougb [Tue, 9 Aug 2011 19:59:22 +0000 (19:59 +0000)]
MFC r224672:

Fix a silly typo on my part.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224737 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224613:
kib [Tue, 9 Aug 2011 08:09:32 +0000 (08:09 +0000)]
MFC r224613:
Corrections for the iBCS2 support.

git-svn-id: svn://svn.freebsd.org/base/stable/8@224727 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f