]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
12 years agoMFC r228307:
kib [Tue, 3 Jan 2012 10:02:44 +0000 (10:02 +0000)]
MFC r228307:
Force linker error when created shared library contains a relocation
against text. Provide the override switch to turn off the strict
behaviour. Apparently, openssl libcrypto needs it due to assembler
code not being PIC.

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

12 years agoMFC r228261:
kib [Tue, 3 Jan 2012 09:51:34 +0000 (09:51 +0000)]
MFC r228261:
Use explicit information from the kernel to detect the traps due to
syscall entry and leave.

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

12 years agoMFC r225974:
kib [Tue, 3 Jan 2012 09:46:51 +0000 (09:46 +0000)]
MFC r225974:
Remove no longer valid statement about ARM.

MFC r226066:
Remove no longer needed BUGS section.

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

12 years agoMFC r226112:
kib [Tue, 3 Jan 2012 09:43:26 +0000 (09:43 +0000)]
MFC r226112:
Remove unused define.

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

12 years agoMFC r226065:
kib [Tue, 3 Jan 2012 09:42:08 +0000 (09:42 +0000)]
MFC r226065:
Convert MIPS to the syscallenter/syscallret system call sequence handlers.

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

12 years agoMFC rr225973:
kib [Tue, 3 Jan 2012 09:40:31 +0000 (09:40 +0000)]
MFC rr225973:
Convert ARM to the syscallenter/syscallret system call sequence handlers.

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

12 years agoMFC r229104:
kib [Tue, 3 Jan 2012 09:27:23 +0000 (09:27 +0000)]
MFC r229104:
Make the comment in i386/include/ucontext.h identical to the one in
amd64/include/ucontext.h. The later is better worded.

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

12 years agoMFC r229317:
hselasky [Tue, 3 Jan 2012 08:31:47 +0000 (08:31 +0000)]
MFC r229317:
Fix for USB suspend and resume.

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

12 years agoMFC r228795:
eadler [Tue, 3 Jan 2012 03:38:50 +0000 (03:38 +0000)]
MFC r228795:

- document the -l option to usermod

Approved by: gjb

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

12 years agoMFC r226871-226872:
yongari [Tue, 3 Jan 2012 00:56:05 +0000 (00:56 +0000)]
MFC r226871-226872:
r226871:
  Add initial BCM5720 support.
  Many thanks to Broadcom for continuing support of FreeBSD.

  Submitted by: Geans Pin at Broadcom (initial version)
  H/W donated by: Broadcom

r226872:
  Disable updating InputDiscards counter for BCM5717, BCM5718,
  BCM5719 A0 and BCM5720 A0 and add comment why driver does not try
  to read it.

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

12 years agoMFC r226870:
yongari [Tue, 3 Jan 2012 00:45:14 +0000 (00:45 +0000)]
MFC r226870:
  Recognize BCM5720C PHY.

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

12 years agoMFC r226814-226815,226820-226821,226864,226866-226867:
yongari [Tue, 3 Jan 2012 00:22:57 +0000 (00:22 +0000)]
MFC r226814-226815,226820-226821,226864,226866-226867:
r226814:
  Rename definition of BGE_SOFTWARE_GENCOMM_* to more readable ones.
  The origin of GENCOMM seems to come from Alteon Tigon Host/NIC
  interface definition where it defines general communications region
  which is active when firmware is loaded and running.  This region
  was used in communication between the host and processor internal
  to the Tigon chip.
  Broadcom data sheet also defines the region as 'Software Gencomm'
  in NetXtreme memory map but lacks detailed description of its
  interface so it was hard to know which ones are used for which
  interface.
  This change shall slightly enhance readability.

  No functional changes.

r226815:
  Define MAC address mail box and use it instead of using
  hard-coded value.

r226820:
  Offset 0x6810 is RX-RISC event register. Rename BGE_CPU_EVENT with
  BGE_RX_CPU_EVENT for readability.
  Additionally define BGE_TX_CPU_EVENT for TX-RSIC event register(BCM570[0-4] only).

r226821:
  SRAM offset 0x0C04 is used by driver to inform the IPMI/ASF firmware
  about the various driver events like load, unload, reset, suspend,
  restart, and ioctl operations.
  Define driver's event rather than using hard-coded values.  We don't
  still send suspend/resume event to firmware.

  Previously bge(4) used BGE_SDI_STATUS to send events. Because driver
  has to access firmware mail box to inform current state, using
  BGE_SDI_STATUS register was wrong. The end result was the same as
  BGE_SDI_STATUS is 0x0C04.

  No functional changes.

r226864:
  Rename BGE_FW_DRV_ALIVE/BGE_FW_PAUSE to BGE_FW_CMD_DRV_ALIVE/BGE_FW_CMD_PAUSE.
  Also add more firmware commands(not used yet).
  No functional changes.

r226866:
  Rename hard-coded value 1 << 14 with BGE_RX_CPU_DRV_EVENT.
  This bit(SW event 7 in publicly available data sheet) is used to
  make RX CPU handle a firmware command and the bit is automatically
  cleared after RX CPU completed the command.
  Generally firmware command takes the following steps.
   1. Write BGE_SRAM_FW_CMD_MB with a command.
   2. Write BGE_SRAM_FW_CMD_LEN_MB with the length of the command in bytes.
   3. Write BGE_SRAM_FW_CMD_DATA_MB with actual command data.
   4. Generate BGE_RX_CPU_EVENT and let firmware handle the command.
   5. Wait for the ACK of the firmware command.

  No functional changes.

r226867:
  Define BGE_FW_HB_TIMEOUT_SEC and remove one more magic value.
  bge(4) sends BGE_FW_CMD_DRV_ALIVE command to firmware every 2
  seconds.  BGE_FW_CMD_DRV_ALIVE command requires 4 bytes data.  This
  data contains timeout value in seconds until the next
  BGE_FW_CMD_DRV_ALIVE command.
  Broadcom recommends driver set the value 3 times longer than the
  interval that it sends BGE_FW_CMD_DRV_ALIVE.  Currently bge(4) uses
  3 seconds so probably we have to increase it in future and use
  different ALIVE command(e.g. BGE_FW_CMD_DRV_ALIVE3).

  No functional changes.

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

12 years agoMFC r226749,226770,226804-226807:
yongari [Tue, 3 Jan 2012 00:07:49 +0000 (00:07 +0000)]
MFC r226749,226770,226804-226807:
r226749:
  Whitespace nits.

r226770:
  Fix long standing bge_sysctl_debug_info() issues.
   o Protect bge(4) status block access and register dump with driver lock.
   o Add missing bus_dmamap_sync() before dumping status block.
   o Use minimum status block size, 32 bytes, for status block dump on most
     controllers except BCM5700 AX/BX.
  While I'm here, make the handler show 5717 Plus in hardware flags.

r226804:
  Make CPMU handle GPHY power down control on controllers that have
  CPMU capability.

r226805:
  It is known that all Broadcom controllers have 4GB boundary DMA
  bug.  Apply workaround to all controllers.

r226806:
  Broadcom says BCM5755 or higher and BCM5906 have short DMA bug.
  Apply workaround to these controllers.

r226807:
  BCM5719 cannot handle DMA requests for DMA segments that have
  larger than 4KB in size.  However the maximum DMA segment size
  created in DMA tag is 4KB, so we wouldn't encounter the issue here.
  Just record this issue such that let developers not to create a DMA
  segment that is larger than 4KB for BCM5719. It's possible to split
  a DMA segment into multiple smaller ones in run time but I believe
  it's not worth to implement that.

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

12 years agoMFC r226745:
yongari [Mon, 2 Jan 2012 23:53:26 +0000 (23:53 +0000)]
MFC r226745:
  axe(4) got VLAN over-sized frame support.
  Add axe(4) to the list of interfaces that support VLAN over-sized frame.

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

12 years agoMFC r226744:
yongari [Mon, 2 Jan 2012 23:52:20 +0000 (23:52 +0000)]
MFC r226744:
  AX88178/AX88772A/AX88772B supports VLAN over-sized frame.
  Xr vlan.

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

12 years agoMFC r228356:
gjb [Mon, 2 Jan 2012 23:43:16 +0000 (23:43 +0000)]
MFC r228356:

r228356:
 - Update du(1):
   - Sort arguments alphabetically where appropriate
   - '-B blocksize' is not mutually exclusive of '-h|-k|-m'
   - Mention '-t' in synopsis
   - Other wording improvements
   - Update usage() output to reflect the new synopsis
   - Other miscellaneous improvements

PR: 162438

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

12 years agoMFC 226703-226704:
yongari [Mon, 2 Jan 2012 23:43:08 +0000 (23:43 +0000)]
MFC 226703-226704:
r226703:
  Add ALi/ULi M5261/M5263 to supported hardware chipets.

r226704:
  All dc(4) controllers support VLAN over-sized frame.
  Xr vlan

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

12 years agoMFC r226701:
yongari [Mon, 2 Jan 2012 23:35:18 +0000 (23:35 +0000)]
MFC r226701:
  Add support for ALi/ULi, now NVIDIA, M5261/M5263 PCI FastEthernet
  controller which is found on ULi M1563 South Bridge & M1689 Bridge.
  These controllers look like a tulip clone.
  M5263 controller does not support MII bitbang so use DC_ROM
  register to access MII registers.  Like other tulip variants, ULi
  controller uses a setup frame to configure RX filter and uses new
  setup frame format.  It's not clear to me whether the controller
  supports a hash based multicast filtering so this patch uses 14
  perfect multicast filter to filter multicast frames.  If number of
  multicast addresses is greater than 14, controller is put into a
  mode that receives all multicast frames.
  Due to lack of access to M5261, this change was not tested with
  M5261 but it probably works.  Many thanks to Marco who provided
  remote access to M5263.

  Tested by: Marco Steinbach <coco <> executive-computing dot de>,
Martin MATO <martin.mato <> orange dot fr>

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

12 years agoMFC r226699:
yongari [Mon, 2 Jan 2012 23:17:45 +0000 (23:17 +0000)]
MFC r226699:
  When driver is run for the first time there would be no established
  link such that calling dc_setcfg() right after media change would
  be meaningless unless controller in question is not Davicom DM9102.
  Ideally dc_setcfg() should be called when speed/duplex is resolved
  otherwise it would reprogram controller with wrong speed/duplex
  information.  Because MII status change callback already calls
  dc_setcfg() I think calling dc_setcfg() in dc_init_locked() is
  wrong.  For instance, it would take some time to establish a link
  after mii_mediachg(), so blindly calling dc_setcfg() right after
  mii_mediachg() will always yield wrong media configuration.

  Extend dc_ifmedia_upd() to handle media change and still allow
  21143 and Davidcom controllers program speed/duplex regardless of
  current resolved speed/duplex of link. In theory 21143 may not need
  to call dc_setcfg() right after media change, but leave it as it is
  because there are too many variants to test that change.  Probably
  dc(4) shall need a PHY reset in dc_ifmedia_upd() but it's hard to
  verify correctness of the change.

  This change reliably makes ULi M5263 establish a link.

  While I'm here correctly report media change result. Previously it
  always reported a success.

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

12 years agoMFC r228885:
gjb [Mon, 2 Jan 2012 22:25:21 +0000 (22:25 +0000)]
MFC r228885:

r228885:
 - Add missing opening and closing brackets in getopt_long.3 and
   getsubopt.3 to make the examples reflect reality more closely.

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

12 years agoMFC r228823:
gjb [Mon, 2 Jan 2012 22:23:26 +0000 (22:23 +0000)]
MFC r228823:

r228823:
 - Enclose tabbed content in quote
 - Start a sentence on a newline

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

12 years agoMFC r228823:
gjb [Mon, 2 Jan 2012 22:18:07 +0000 (22:18 +0000)]
MFC r228823:

r228823:
 - Enclose tabbed content in quotes

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

12 years agoMFC r228823, r228824:
gjb [Mon, 2 Jan 2012 22:15:32 +0000 (22:15 +0000)]
MFC r228823, r228824:

r228823:
 - Properly escape a special character
 - Enclose tabbed content in quotes

r228824:
 - Remove trailing whitespace

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

12 years agoMFC r228418, 228419:
gjb [Mon, 2 Jan 2012 22:11:08 +0000 (22:11 +0000)]
MFC r228418, 228419:

r228418:
 - Document the SVN variable needs to be set in make.conf(5) when
   SVN_UPDATE is set [1]

r228419:
 - Minor whitespace cleanup to make.conf(5)

PR: 163162 [1]

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

12 years agoSince stable/9 has been released from code freeze and the 9.0-RELEASE
kensmith [Mon, 2 Jan 2012 20:39:59 +0000 (20:39 +0000)]
Since stable/9 has been released from code freeze and the 9.0-RELEASE
builds are underway shift stable/9 to 9.0-STABLE.

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

12 years agoMFC r228741, r228742:
mav [Mon, 2 Jan 2012 19:55:59 +0000 (19:55 +0000)]
MFC r228741, r228742:
Add timecounters(4) man page alike to eventtimers(4).

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

12 years agoMFC r228735, r228737, r228739:
mav [Mon, 2 Jan 2012 19:54:17 +0000 (19:54 +0000)]
MFC r228735, r228737, r228739:
Add apic(4) man page, now mostly to cover its event timer functionality.

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

12 years agoMFC r228731:
mav [Mon, 2 Jan 2012 19:51:12 +0000 (19:51 +0000)]
MFC r228731:
Add eventtimers(9) man page, describing related KPIs.

Sponsored by:   iXsystems, Inc.

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

12 years agoMFC r228575:
mav [Mon, 2 Jan 2012 19:49:01 +0000 (19:49 +0000)]
MFC r228575:
Some formatting fixes.

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

12 years agoMFC r228501:
mav [Mon, 2 Jan 2012 19:47:35 +0000 (19:47 +0000)]
MFC r228501:
After several suggestions from people, move eventtimers page from 7 to 4.

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

12 years agoMFC r228305:
mav [Mon, 2 Jan 2012 19:44:34 +0000 (19:44 +0000)]
MFC r228305:
Mention that Cold Presence Detection feature used for hot-plug detection
when interface power management is enabled.

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

12 years agoThe portion of r225757 that added the packages-9.0-release directory
kensmith [Mon, 2 Jan 2012 18:42:29 +0000 (18:42 +0000)]
The portion of r225757 that added the packages-9.0-release directory
was supposed to be MFCed closer to the release but that got missed.

Pointy hat: kensmith

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

12 years agoMFC r227464, r227471
mav [Mon, 2 Jan 2012 18:06:48 +0000 (18:06 +0000)]
MFC r227464, r227471
Major GEOM MULTIPATH class rewrite:
 - Improved locking and destruction process to fix crashes.
 - Improved "automatic" configuration method to make it consistent and safe
by reading metadata back from all specified paths after writing to one.
 - Added provider size check to reduce chance of ordering conflict with
other GEOM classes.
 - Added "manual" configuration method without using on-disk metadata.
 - Added "add" and "remove" commands to allow manage paths manually.
 - Failed paths are no longer dropped from geom, but only marked as FAIL
and excluded from I/O operations.
 - Automatically restore failed paths when all others paths are marked
as failed, for example, because of device-caused (not transport) errors.
 - Added "fail" and "restore" commands to manually control FAIL flag.
 - geom is now destroyed on last path disconnection.
 - Added optional Active/Active mode support. Unlike Active/Passive
mode, load evenly distributed between all working paths. If supported by
the device, it allows to significantly improve performance, utilizing
bandwidth of all paths. It is controlled by -A option during creation.
Disabled by default now.
 - Improved `status` and `list` commands output.

Sponsored by:   iXsystems, inc.

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

12 years agoMFC r226816:
mav [Mon, 2 Jan 2012 17:56:45 +0000 (17:56 +0000)]
MFC r226816:
Clarify disks/volumes above 2TiB support in geom_raid:
 - add support for volumes above 2TiB with Promise metadata format;
 - enforse and document other limitations:
   - Intel and Promise metadata formats do not support disks above 2TiB;
   - NVIDIA metadata format does not support volumes above 2TiB.

Sponsored by:   iXsystems, Inc.

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

12 years agoMFC r228819:
mav [Mon, 2 Jan 2012 17:39:18 +0000 (17:39 +0000)]
MFC r228819:
Update list of 4K physical sector hard drives.

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

12 years agoMFC r227637:
mav [Mon, 2 Jan 2012 17:36:14 +0000 (17:36 +0000)]
MFC r227637:
Introduce CAM_SIM_POLLED SIM flag, indicating that it works in polling mode.
It blocks CAM SWI usage on requests completion, unneeded because of polling
and denied during kernel dumping because of blocked scheduler.

Before r198899 there was periph flag CAM_PERIPH_POLLED, but that was wrong,
because there is whole SIM is polled or handled by SWI, not a single periph.

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

12 years agoMFC r228497:
mav [Mon, 2 Jan 2012 17:30:27 +0000 (17:30 +0000)]
MFC r228497:
Add PCI IDs for the Intel ICH9M SATA controllers.

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

12 years agoMFC r226680:
mav [Mon, 2 Jan 2012 17:27:07 +0000 (17:27 +0000)]
MFC r226680:
Some dmesg cosmetics:
 - for the legacy PCI ATA channels move channel number out of the device
description, same as it is for ahci(4), siis(4) and mvs(4);
 - add device description for the ISA ATA channels.

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

12 years agoMFC r228200:
mav [Mon, 2 Jan 2012 17:19:58 +0000 (17:19 +0000)]
MFC r228200:
Add hw.ahci.force tunable to control whether AHCI drivers should attach
to known AHCI-capable chips (AMD/NVIDIA), configured for legacy emulation.

Enabled by default to get additional performance and functionality of AHCI
when it can't be enabled by BIOS. Can be disabled to honor BIOS settings if
needed for some reason.

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

12 years agoMFC r227635:
mav [Mon, 2 Jan 2012 17:13:56 +0000 (17:13 +0000)]
MFC r227635:
Change the way how "not implemented" AHCI channels handled. Instead of
completely skipping them, create ahcich devices for them to allocate unit
numbers, but mark them as disabled to prevent driver probe and attach.

Last time some BIOSes tend to report unused channels as "not implemented".
This change makes ahcichX devices numbering consistent, independently of
connected disks. It makes per-channel driver hints usable and CAM devices
wiring possible on such systems.

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

12 years agoMFC: r227543
rmacklem [Mon, 2 Jan 2012 16:54:21 +0000 (16:54 +0000)]
MFC: r227543
Modify the new NFS client so that nfs_fsync() only calls ncl_flush()
for regular files. Since other file types don't write into the
buffer cache, calling ncl_flush() is almost a no-op. However, it does
clear the NMODIFIED flag and this shouldn't be done by nfs_fsync() for
directories.

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

12 years agoMFC r228444:
mdf [Mon, 2 Jan 2012 16:14:52 +0000 (16:14 +0000)]
MFC r228444:

 - Define true and false in sys/types.h for _KERNEL consumers, and
   typedef bool.  Due to macro expansion it seemed better to use a
   typedef for kernel consumers (specifically ofed won't compile
   without more changes if a define is used).
 - <stdbool.h> should also not re-define bool/true/false if they are
   defined by <sys/types.h>.  It would probably be a programming error
   to define _KERNEL for user-space code, but downstream consumers
   like Isilon have already been including <stdbool.h> in kernel
   sources, and this protects that usage.
 - sizeof(_Bool) is not necessarily the same as sizeof(int), so kernel
   modules should be rebuilt with this change.  Bump __FreeBSD_version.

No KBI change is expected based on review of the code.

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

12 years agoGuess when we'll be ready to announce 9.0-RELEASE.
kensmith [Mon, 2 Jan 2012 14:43:33 +0000 (14:43 +0000)]
Guess when we'll be ready to announce 9.0-RELEASE.

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

12 years agoMFC r228868:
dim [Mon, 2 Jan 2012 13:21:34 +0000 (13:21 +0000)]
MFC r228868:

When building the kernel for amd64 with clang, don't attempt to use the
-frename-registers option, as it is not supported.  No change for builds
with gcc.

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

12 years agoMFC r228861:
dim [Mon, 2 Jan 2012 13:20:01 +0000 (13:20 +0000)]
MFC r228861:

Set WERROR= for the nve(4) module.  This driver gives several warnings
with clang, which will probably never be fixed, as it is unmaintained,
and superseded by nfe(4).

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

12 years agoMFC r228822:
dim [Mon, 2 Jan 2012 13:17:31 +0000 (13:17 +0000)]
MFC r228822:

  When building the kernel with clang, it produces several warnings which
  might be useful in some cases, but which are not severe enough to error
  out the whole kernel build.  Display them anyway, so there is at least
  some incentive to fix them eventually.

  Start with -Wtautological-compare warnings.  These usually occur when
  people check if unsigned quantities are negative, or similar cases.  To
  clean these up would be painful, and might give problems if the base
  type which is compared against changes to signed later on.

MFC r228841:

  Amend r228822 by not directly adding to CWARNFLAGS, but to an optional
  CWARNEXTRA variable, which gets included into the initial CWARNFLAGS
  setting.  This makes it easier to override CWARNFLAGS with completely
  custom settings (including enabling any disabled warnings).

  Reminded by: arundel

MFC r228860:

  Make another clang warning, -Wempty-body, non-fatal during kernel
  builds.  All the instances of this warning in our tree are completely
  harmless.  (Most of the empty bodies look to be used simply as reminder
  for the developer to add something later.)

  While here, assign to CWARNEXTRA with ?=, so it can be overridden
  easily, if needed.

MFC r228867:

  Make another clang warning, -Wparentheses-equality, non-fatal during
  kernel builds.  All the instances of this warning in our tree are
  completely harmless, and many people seem to like adding extra
  parentheses to make precedence clearer.

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

12 years agoMFC r228801:
dim [Mon, 2 Jan 2012 13:12:53 +0000 (13:12 +0000)]
MFC r228801:

Remove -mfancy-math from LIB32CPUFLAGS for amd64.  It has been default
for our gcc since more than three years (see r181534, which is also in
stable/9 and stable/8).  This flag used to be for the benefit of the old
in-kernel math emulator, which was removed more than eight years ago.

Pointed out by: arundel

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

12 years agoMFC r228783:
dim [Mon, 2 Jan 2012 13:01:57 +0000 (13:01 +0000)]
MFC r228783:

  When building with clang, disable -Wshift-count-negative and
  -Wshift-count-overflow for sys/dev/ath/ath_hal/ah_regdomain.c, as it
  gets multiple instances of the following warnings:

  In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99:
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:69:15: warning: shift count is negative [-Wshift-count-negative]
           .chan11a               = BM4(F1_4950_4980,
                                    ^~~~~~~~~~~~~~~~~
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:41:4: note: expanded from:
            W1(_fa) | W1(_fb) | W1(_fc) | W1(_fd) }
            ^
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:34:45: note: expanded from:
          (((_a) > 63 && (_a) < 128 ? (((uint64_t) 1)<<((_a)-64)) : (uint64_t) 0))
                                                     ^ ~~~~~~~~~

  and:

  In file included from sys/dev/ath/ath_hal/ah_regdomain.c:99:
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:629:15: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
           .chan11a               = BM4(W2_5260_5320,
                                    ^~~~~~~~~~~~~~~~~
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:40:34: note: expanded from:
          { W0(_fa) | W0(_fb) | W0(_fc) | W0(_fd),                        \
                                          ^
  sys/dev/ath/ath_hal/ah_regdomain/ah_rd_domains.h:32:44: note: expanded from:
          (((_a) >= 0 && (_a) < 64 ? (((uint64_t) 1)<<(_a)) : (uint64_t) 0))
                                                    ^ ~~~~

  Both warnings are false positives, caused by LLVM PR 10030.  For global
  initializations, clang fails to detect that the branch of the ternary
  operator causing the warning is dead.

MFC r228793:

  Amend r228783 by also disabling -Wshift-count-negative
  -Wshift-count-overflow warnings for the ath module.

MFC r228818:

  Disable various warnings for the ath module in a more fine-grained way:
  only add the option for the specific .c files that need them, like via
  sys/conf/files.

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

12 years agoMFC r228781:
dim [Mon, 2 Jan 2012 12:53:11 +0000 (12:53 +0000)]
MFC r228781:

  When building with clang, disable -Warray-bounds for sys/dev/asr/asr.c,
  as it gets the following warning:

  sys/dev/asr/asr.c:1836:29: warning: array index of '58' indexes past the end of an array (that contains 1 element) [-Warray-bounds]
          while ((len > 0) && (sg < &((PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE)
                                     ^
  sys/dev/asr/i2omsg.h:934:8: note: array 'Simple' declared here
         I2O_SGE_SIMPLE_ELEMENT              Simple[1];
         ^

  This is a false positive, since I2O_SG_ELEMENT::Simple is not declared
  as a C99 flexible array member, but in the old (but more portable) way.
  At run-time, the proper number of array elements will hopefully have
  been allocated.

MFC r228865:

  Amend r228781 by also disabling -Warray-bounds warnings for the asr
  module.

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

12 years agoMFC r228779:
dim [Mon, 2 Jan 2012 12:50:19 +0000 (12:50 +0000)]
MFC r228779:

  Start selectively disabling a few kernel build warnings for clang, since
  there are some places in the kernel where fixing them is too disruptive,
  or where there is a false positive.

  In this case, disable -Wconstant-conversion for two aic7xxx-related
  files, as they get the following warning on i386 (and possibly on other
  32-bit arches):

  sys/dev/aic7xxx/ahc_pci.c:112:10: warning: implicit conversion from 'long long' to 'bus_addr_t' (aka 'unsigned int') changes value from 549755813887 to 4294967295 [-Wconstant-conversion]
                                     ? 0x7FFFFFFFFFLL
                                     ~~^~~~~~~~~~~~~~

  This is a false positive, since the code only passes the 0x7FFFFFFFFFLL
  argument, if sizeof(bus_addr_t) is larger than 4 (e.g. on 64 bit arches,
  or when PAE is enabled on i386).  The code could be refactored to do
  compile-time checks, but that is more disruptive.

MFC r228789:

  Amend r228779 by also disabling -Wconstant-conversion warnings for the
  aic7xxx module.

MFC r228805:

  Disable -Wconstant-conversion warnings for the aic7xxx module in a more
  fine-grained way: only add the option for the specific .c files that
  need them, like via sys/conf/files.

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

12 years agoMFC: r227517
rmacklem [Mon, 2 Jan 2012 04:25:25 +0000 (04:25 +0000)]
MFC: r227517
Move the setting of the default value for nm_wcommitsize to
before the nfs_decode_args() call in the new NFS client, so
that a specfied command line value won't be overwritten.
Also, modify the calculation for small values of desiredvnodes
to avoid an unusually large value or a divide by zero crash.
It seems that the default value for nm_wcommitsize is very
conservative and may need to change at some time.

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

12 years agoRELENG_9 exists now so updated commented-out branch target.
kensmith [Mon, 2 Jan 2012 04:01:34 +0000 (04:01 +0000)]
RELENG_9 exists now so updated commented-out branch target.

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

12 years agoMFC: r227494
rmacklem [Mon, 2 Jan 2012 03:26:59 +0000 (03:26 +0000)]
MFC: r227494
Since NFSv4 byte range locking only works for regular files,
add a sanity check for the vnode type to the NFSv4 client.

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

12 years agoMFC r228434:
kib [Mon, 2 Jan 2012 00:46:13 +0000 (00:46 +0000)]
MFC r228434:
Add definitions for GNU-specific STT_GNU_IFUNC symbol type,
and R_{386,X86_64}_IRELATIVE relocations.

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

12 years agoMFC r228751:
kib [Mon, 2 Jan 2012 00:04:51 +0000 (00:04 +0000)]
MFC r228751:
Change the type of real_dev_bsize variable from long to u_int.
The DIOCGSECTORSIZE takes u_int * as an argument, using long *
causes failures on big-endian targets.

PR: sparc64/163460

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

12 years agoMFC r228570:
kib [Mon, 2 Jan 2012 00:02:50 +0000 (00:02 +0000)]
MFC r228570:
Document 'findstack'.

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

12 years agoMFC r228569:
kib [Mon, 2 Jan 2012 00:01:09 +0000 (00:01 +0000)]
MFC r228569:
Add 'findstack' ddb command to search either the thread kernel stack
or cached stack containing the specified kernel virtual address.

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

12 years agoShow the thread kernel stack base address for 'show threads'.
kib [Sun, 1 Jan 2012 23:58:20 +0000 (23:58 +0000)]
Show the thread kernel stack base address for 'show threads'.

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

12 years agoMFC r228567:
kib [Sun, 1 Jan 2012 23:55:17 +0000 (23:55 +0000)]
MFC r228567:
Move kstack_cache_entry into the private header, and make the
stack cache list header accessible outside vm_glue.c.

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

12 years agoMFC r228722:
dim [Sun, 1 Jan 2012 23:53:16 +0000 (23:53 +0000)]
MFC r228722:

In usr.sbin/yp_mkdb/yp_mkdb.c, cast some printf field width parameters
to int, cast time_t to intmax_t, and use the corresponding printf length
modifier.

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

12 years agoMFC r228721:
dim [Sun, 1 Jan 2012 23:51:38 +0000 (23:51 +0000)]
MFC r228721:

In usr.sbin/uhsoctl/uhsoctl.c, fix a few warnings about format strings
not being literals.

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

12 years agoMFC r228306:
kib [Sun, 1 Jan 2012 23:51:18 +0000 (23:51 +0000)]
MFC r228306:
Most users of pipe(2) do not call fstat(2) on the returned pipe descriptors.
Optimize for the case, by lazily allocating the pipe inode number at the
fstat(2) time.

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

12 years agoMFC r228714:
dim [Sun, 1 Jan 2012 23:49:11 +0000 (23:49 +0000)]
MFC r228714:

  In usr.sbin/timed, fix several issues with printf formats:
  - Cast time_t's to long, and print them with %ld.
  - Print ptrdiff_t's with %td.
  - Print ssize_t's and size_t's with %zd and %zu.
  - Print int32_t's with %d.
  Also, replace some int variables with the more appropriate size_t.

MFC r228719:

  Some people pointed out long is 32-bit on some arches, while time_t is
  64-bit, so better cast time_t to intmax_t, and use the appropriate
  printf format strings.

MFC r228720:

  Fix r228719; when you use intmax_t, you need stdint.h.

  Pointy hat to: dim

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

12 years agoMFC r228263:
kib [Sun, 1 Jan 2012 23:46:08 +0000 (23:46 +0000)]
MFC r228263:
Initialize fifoinfo fi_wgen field on open.

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

12 years agoMFC r228713:
dim [Sun, 1 Jan 2012 23:45:21 +0000 (23:45 +0000)]
MFC r228713:

In contrib/tcpdump/print-icmp6.c, fix a problem where the comparison
against icmp6_hdr::icmp6_type is done incorrectly.  (This fix has
already been applied upstream, but we do not have the latest version of
tcpdump.)

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

12 years agoMFC r228682:
dim [Sun, 1 Jan 2012 23:43:45 +0000 (23:43 +0000)]
MFC r228682:

  In usr.sbin/sade/install.c and usr.sbin/sade/label.c, fix a few warnings
  about format strings not being literals.

MFC r228683:

  Forgot to add usr.sbin/sade/label.c in the previous commit.

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

12 years agoMFC r228681:
dim [Sun, 1 Jan 2012 23:41:31 +0000 (23:41 +0000)]
MFC r228681:

In usr.sbin/sa/db.c, avoid warnings about assigning two const char
arrays to non-const void pointers, by casting away const explicitly.

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

12 years agoMFC r228678:
dim [Sun, 1 Jan 2012 23:39:56 +0000 (23:39 +0000)]
MFC r228678:

  In usr.sbin/rpc.ypupdated/yp_dbupdate.c, use the appropriate printf
  length modifier for time_t (after casting it to intmax_t).

MFC r228679:

  In usr.sbin/rpc.ypupdated/yp_dbupdate.c, include stdint.h, so intmax_t
  is known, otherwise it won't build.

  Pointy hat to: dim

MFC r228680:

  In usr.sbin/rpc.ypupdated/yp_dbupdate.c, since intmax_t is signed, just
  like time_t, better use %jd instead of %ju.  Strangely enough, neither
  gcc, clang nor gcc 4.6 warn about this discrepancy...

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

12 years agoMFC r228177:
kib [Sun, 1 Jan 2012 23:36:13 +0000 (23:36 +0000)]
MFC r228177:
Add a simple test for pipe inode numbers reported by fstat(2).

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

12 years agoMFC r228674:
dim [Sun, 1 Jan 2012 23:34:59 +0000 (23:34 +0000)]
MFC r228674:

In usr.sbin/route6d/route6d.c, use the correct printf length modifier
for an ssize_t.

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

12 years agoMFC r227656:
kib [Sun, 1 Jan 2012 23:34:06 +0000 (23:34 +0000)]
MFC r227656:
Use the alternate form of the gcc extension that works even with
-ansi -pedantic without issuing a warning, and which is recommended
by gcc manual.

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

12 years agoMFC r228673:
dim [Sun, 1 Jan 2012 23:33:08 +0000 (23:33 +0000)]
MFC r228673:

In usr.sbin/pw/pw_user.c, use the correct printf length modifier for a
ptrdiff_t.

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

12 years agoMFC r228672:
dim [Sun, 1 Jan 2012 23:26:49 +0000 (23:26 +0000)]
MFC r228672:

In contrib/pnpinfo/pnpinfo.c, remove an extraneous parameter from the
call to isolation_protocol().

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

12 years agoMFC r228671:
dim [Sun, 1 Jan 2012 23:20:36 +0000 (23:20 +0000)]
MFC r228671:

In usr.sbin/pmccontrol/pmccontrol.c, fix a few warnings about format
strings not being literals.

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

12 years agoMFC r228670:
dim [Sun, 1 Jan 2012 23:18:34 +0000 (23:18 +0000)]
MFC r228670:

In usr.sbin/pkg_install/updating/main.c, use the size of the destination
buffer as size argument to strlcpy(), not the length of the source.

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

12 years agoMFC r227817:
kib [Sun, 1 Jan 2012 23:17:08 +0000 (23:17 +0000)]
MFC r227817:
Put all the messages from msdosfs under the MSDOSFS_DEBUG ifdef.

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

12 years agoMFC r227696:
kib [Sun, 1 Jan 2012 23:12:43 +0000 (23:12 +0000)]
MFC r227696:
Do not use NULLVPTOLOWERVP() in the null_print(). If diagnostic is compiled
in, and show vnode is used from ddb on the faulty nullfs vnode, we get
panic instead of vnode dump.

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

12 years agoMFC r228665:
dim [Sun, 1 Jan 2012 23:08:19 +0000 (23:08 +0000)]
MFC r228665:

Use NO_WCAST_ALIGN for usr.sbin/ndiscvt; because this is only built for
x86, any alignment warnings can be safely ignored.  Define YY_NO_INPUT
in usr.sbin/ndiscvt/inf-token.l, so no unused lex functions are defined.

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

12 years agoMFC r227695:
kib [Sun, 1 Jan 2012 23:07:13 +0000 (23:07 +0000)]
MFC r227695:
Use the plain panic calls, without additional printing around them.

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

12 years agoMFC r228664:
dim [Sun, 1 Jan 2012 23:04:27 +0000 (23:04 +0000)]
MFC r228664:

In usr.sbin/lpr/lpd/printjob.c, use the correct printf length modifiers
for off_t (aka int64_t).

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

12 years agoMFC r228663:
dim [Sun, 1 Jan 2012 22:34:37 +0000 (22:34 +0000)]
MFC r228663:

In usr.sbin/lpr/filters/lpf.c, use a less obtuse way of clearing the
buffer, that also avoids warnings.

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

12 years agoMFC r228909:
dougb [Sun, 1 Jan 2012 22:33:02 +0000 (22:33 +0000)]
MFC r228909:

1. Remove a bunch of duplicates. Usually this means removing them from
   fortunes, but occasionally remove them from the other 2 files when
   they are not offensive, or not murphy'ish enough.

   Where the version in fortunes had better attribution and/or formatting,
   copy it over.

2. Fix a few typos

3. Use the full name of François De La Rochefoucauld, fix one of his
   quotes, and remove the duplicate of it.

MFC r228934:

Prefer ASCII apostrophes over Unicode ones like the rest of the file.

MFC r228938:

1. Correct capitalization of the nobility particle for
   Francois de La Rochefoucauld introduced in r228909

2. Change c-cedilla introduced in the same commit to ASCII c since
   non-UTF-8 terminals will choke on the non-ASCII text.

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

12 years agoMFC r228662:
dim [Sun, 1 Jan 2012 22:26:56 +0000 (22:26 +0000)]
MFC r228662:

In usr.sbin/keyserv, fix some implicit enum conversions, and use the
correct printf length modifiers for uid_t.

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

12 years agoMFC r228661:
dim [Sun, 1 Jan 2012 22:11:22 +0000 (22:11 +0000)]
MFC r228661:

In usr.sbin/iostat/iostat.c, use printf format specifiers from
inttypes.h for u_int64_t's.  While here, sort #include directives.

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

12 years agoMFC r228660:
dim [Sun, 1 Jan 2012 22:08:52 +0000 (22:08 +0000)]
MFC r228660:

In usr.sbin/i2c/i2c.c, fix a few warnings about format strings not being
literals.

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

12 years agoMFC r228659:
dim [Sun, 1 Jan 2012 22:06:41 +0000 (22:06 +0000)]
MFC r228659:

In usr.sbin/ctm/ctm_dequeue/ctm_dequeue.c, cast a printf field width
parameter to int.

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

12 years agoMFC r228658:
dim [Sun, 1 Jan 2012 21:50:21 +0000 (21:50 +0000)]
MFC r228658:

Use NO_WCAST_ALIGN for usr.sbin/cpucontrol; because this is only built
for x86, any alignment warnings can be safely ignored.

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

12 years agoMFC r228657:
dim [Sun, 1 Jan 2012 21:43:14 +0000 (21:43 +0000)]
MFC r228657:

In usr.sbin/bsnmpd/modules/snmp_wlan/wlan_snmp.h, use the correct
enumeration types for the mesh_peering and mesh_forwarding members of
struct wlan_iface, to fix enum conversion warnings.

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

12 years agoMFC r228656:
dim [Sun, 1 Jan 2012 21:38:58 +0000 (21:38 +0000)]
MFC r228656:

Use NO_WCAST_ALIGN for usr.sbin/boot0cfg; because this is only built for
x86, any alignment warnings can be safely ignored.

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

12 years agoMFC r228655:
dim [Sun, 1 Jan 2012 21:28:55 +0000 (21:28 +0000)]
MFC r228655:

In usr.sbin/bluetooth/sdpd/server.c, don't use the size of a pointer as
the length argument to memset, but the size of the object pointed to.

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

12 years agoMFC r226427:
dim [Sun, 1 Jan 2012 21:21:57 +0000 (21:21 +0000)]
MFC r226427:

Build rwho(1) with WARNS=6.

The only reason why it didn't build with WARNS=6, is because of some
simple to fix string formatting bugs.

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

12 years agoMFC r228654:
dim [Sun, 1 Jan 2012 21:12:29 +0000 (21:12 +0000)]
MFC r228654:

In usr.bin/vmstat/vmstat.c, cast several printf field widths to int, and
use printf format specifiers from inttypes.h for uint64_t's.

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

12 years agoMFC r228651:
dim [Sun, 1 Jan 2012 21:06:07 +0000 (21:06 +0000)]
MFC r228651:

In contrib/telnet/telnet/utilities.c, fix a few warnings about format
strings not being literals.

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

12 years agoMFC r228650:
dim [Sun, 1 Jan 2012 20:57:38 +0000 (20:57 +0000)]
MFC r228650:

  In usr.bin/netstat/atalk.c, work around a clang false positive with
  printf format warnings and conditional operators.

MFC r228668:

  Revert r228650, and work around the clang false positive with printf
  formats in usr.bin/netstat/atalk.c by conditionally adding NO_WFORMAT to
  the Makefile instead.

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

12 years agoMFC r228649:
dim [Sun, 1 Jan 2012 20:53:33 +0000 (20:53 +0000)]
MFC r228649:

Use NO_WCAST_ALIGN for usr.bin/ncplist, as there are many potential
alignment issues in it.  (Though I doubt anyone still cares about
NetWare support...)

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

12 years agoMFC r228647:
dim [Sun, 1 Jan 2012 20:51:51 +0000 (20:51 +0000)]
MFC r228647:

In usr.bin/mail/cmd1.c, use the correct printf length modifier for a
ptrdiff_t.  In usr.bin/mail/main.c, cast a field width to int.

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

12 years agoMFC r228639:
dim [Sun, 1 Jan 2012 19:25:43 +0000 (19:25 +0000)]
MFC r228639:

In usr.bin/indent/io.c, fix a few warnings about format strings not
being literals.

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

12 years agoMFC r228712:
dim [Sun, 1 Jan 2012 19:19:48 +0000 (19:19 +0000)]
MFC r228712:

Use NO_WCAST_ALIGN for usr.bin/hastctl and usr.bin/hastd; the alignment
warnings in sbin/hastd/lzf.c are only emitted for i386 and amd64, and
there they can be safely ignored.

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

12 years agoMFC r228636:
dim [Sun, 1 Jan 2012 19:15:52 +0000 (19:15 +0000)]
MFC r228636:

Correct a logic error in usr.bin/hexdump/conv.c, found by clang.

Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead.  It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention.  Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

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

12 years agoMFC r228628:
dim [Sun, 1 Jan 2012 19:11:47 +0000 (19:11 +0000)]
MFC r228628:

  In usr.bin/gprof/aout.c, use the correct printf length modifier for a
  uint32_t.

MFC r228629:

  More fixes for correct printf length modifiers usr.bin/gprof.

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