]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 years agoFix leaks and test for getpagesize() returning == -1
ngie [Tue, 19 Apr 2016 22:25:14 +0000 (22:25 +0000)]
Fix leaks and test for getpagesize() returning == -1

- close file descriptors after use.
- Always munmap memory regions after mmap'ing them.
- Make sure getpagesize() returns a value greater than 0 and use a
  cached value instead of always calling getpagesize(3).

CID: 1331374-13313771331653-1331662
Differential Revision: https://reviews.freebsd.org/D6011
MFC after: 2 weeks
Reported by: Coverity
Reviewed by: cem
Sponsored by: EMC / Isilon Storage Division

8 years agodev/usb: use our nitems() macro when param.h is available.
pfg [Tue, 19 Apr 2016 22:07:36 +0000 (22:07 +0000)]
dev/usb: use our nitems() macro when param.h is available.

Reviewed by: hselasky

8 years agoLink bcache into userboot.so, was not added in r298230
allanjude [Tue, 19 Apr 2016 20:56:45 +0000 (20:56 +0000)]
Link bcache into userboot.so, was not added in r298230

This should help speed up bhyve boots too

Reviewed by: olivier

8 years agorestore: use our roundup2/rounddown2() macros when param.h is available.
pfg [Tue, 19 Apr 2016 20:47:14 +0000 (20:47 +0000)]
restore: use our roundup2/rounddown2() macros when param.h is available.

While here cleanup a little a malloc call.

8 years agoAlways emit an error message on passthru configuration errors.
jhb [Tue, 19 Apr 2016 20:43:05 +0000 (20:43 +0000)]
Always emit an error message on passthru configuration errors.

Previously, many errors (such as the PCI device not being attached
to the ppt(4) driver) resulted in bhyve silently exiting without
starting the virtual machine.  Now any errors encountered when
configuring a virtual slot for a PCI passthru device should be noted
on stderr.

Reviewed by: neel
Differential Revision: https://reviews.freebsd.org/D5990

8 years ago1. modify fwdump (a.k.a grcdump) so that grcdump memory is allocated
davidcs [Tue, 19 Apr 2016 20:28:30 +0000 (20:28 +0000)]
1. modify fwdump (a.k.a grcdump) so that grcdump memory is allocated
   and freed on as needed basis.
2. grcdump can be taken at failure points by invoking bxe_grc_dump()
   when trigger_grcdump sysctl flag is set. When grcdump is taken
   grcdump_done sysctl flag is set.
3. grcdump_done can be monitored by the user to retrieve the grcdump.

Submitted by:vaishali.kulkarni@qlogic.com

8 years agonet80211: do not reschedule scan_curchan_task() if the scan was canceled.
avos [Tue, 19 Apr 2016 20:19:21 +0000 (20:19 +0000)]
net80211: do not reschedule scan_curchan_task() if the scan was canceled.

This should fix possible use-after-free in the scheduled task.

PR: 208605

8 years agortld-elf: use our roundup2() macro when param.h is available.
pfg [Tue, 19 Apr 2016 20:12:46 +0000 (20:12 +0000)]
rtld-elf: use our roundup2() macro when param.h is available.

8 years agodump: use NULL instead of zero for pointers.
pfg [Tue, 19 Apr 2016 19:13:33 +0000 (19:13 +0000)]
dump: use NULL instead of zero for pointers.

Clean out the casts from calloc(3) while here.

8 years agofsck_msdosfs: use NULL instead of zero for pointers.
pfg [Tue, 19 Apr 2016 19:08:37 +0000 (19:08 +0000)]
fsck_msdosfs: use NULL instead of zero for pointers.

8 years agortld-elf: use NULL instead of zero for pointers.
pfg [Tue, 19 Apr 2016 19:03:55 +0000 (19:03 +0000)]
rtld-elf: use NULL instead of zero for pointers.

8 years agoaacraid(4): Sanely copyin userland pointers and ensure that we don't get
sbruno [Tue, 19 Apr 2016 18:27:28 +0000 (18:27 +0000)]
aacraid(4): Sanely copyin userland pointers and ensure that we don't get
anything janky from a user. (cturt)

aac(4): landergriffith+freebsdbugzilla@gmail.com pointed out that aacraid(4)
had the same issue and handling of pointers, so let's change that too.

PR: 206573
Submitted by: cturt@hardenedbsd.org
Obtained from: HardenedBSD
MFC after: 1 week

8 years agoPlug memory leak in ctl(4) when ctl_copyin_args() is called with a non-
sbruno [Tue, 19 Apr 2016 16:48:14 +0000 (16:48 +0000)]
Plug memory leak in ctl(4) when ctl_copyin_args() is called with a non-
null terminated ASCII string.

PR: 207626
Submitted by: cturt@hardenedbsd.org
MFC after: 2 days

8 years ago[bhnd] Standardize bhnd device tables and quirk matching.
adrian [Tue, 19 Apr 2016 15:56:39 +0000 (15:56 +0000)]
[bhnd] Standardize bhnd device tables and quirk matching.

This add a bhnd device table mechanism that standardizes matching of
devices on the bhnd(4) bus, discovery of device quirk flags, and should
be pluggable into the new PNPINFO machinery.

Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D5759

8 years ago[bhnd] Clean up bhnd resource handling and inherited bus methods
adrian [Tue, 19 Apr 2016 15:53:57 +0000 (15:53 +0000)]
[bhnd] Clean up bhnd resource handling and inherited bus methods

To facilitate use by SoC implementors working with bhnd-inheriting fdt/nexus
drivers:

* Splits bhnd_bus method implementations into generic bus implementations
  (bhnd_bus_generic) and generic bhnd(4) driver implementations (bhnd_generic)
* Simplifies bhnd resource handling, allowing bhnd bus implementations to
  support bhnd resource activation by implementing the standard BUS_*
  resource APIs and BHND_BUS_ACTIVATE_RESOURCE().

Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D5758

8 years ago[bhnd] Add support for specifying the address space used by bhndb children
adrian [Tue, 19 Apr 2016 15:52:55 +0000 (15:52 +0000)]
[bhnd] Add support for specifying the address space used by bhndb children

This adds support for specifying the address space used by a bridge child;
this will either be the bridged SoC address space, or the host address space
required by children that map non SoC-address ranges from the PCI BAR.

This is necessary to support SROM/OTP child devices that live directly
beneath the bhndb device and require access to host resources, instead
of the standard behavior of delegating access to the bridged SoC address
space.

Submitted by: Landon Fuller <landonf@landonf.org>
Differential Revision: https://reviews.freebsd.org/D5757

8 years agoFix pc98 build error introduced in r298230
allanjude [Tue, 19 Apr 2016 15:46:21 +0000 (15:46 +0000)]
Fix pc98 build error introduced in r298230

Submitted by: Toomas Soome <tsoome@me.com>
Spotted by: bz
Differential Revision: https://reviews.freebsd.org/D6002

8 years agoRevert r298268 (Add optional chip_select/deselect methods).
br [Tue, 19 Apr 2016 15:39:46 +0000 (15:39 +0000)]
Revert r298268 (Add optional chip_select/deselect methods).
None of supported hardware do require that.

8 years agoAssert CS for single transfers.
br [Tue, 19 Apr 2016 15:36:18 +0000 (15:36 +0000)]
Assert CS for single transfers.

8 years agoUse GPIOTOGGLE to toggle the pin state instead of read, modify and write.
loos [Tue, 19 Apr 2016 15:18:31 +0000 (15:18 +0000)]
Use GPIOTOGGLE to toggle the pin state instead of read, modify and write.

8 years agoMention fsck_ffs -E in tunefs(8). It's non-obvious that one should
trasz [Tue, 19 Apr 2016 15:08:35 +0000 (15:08 +0000)]
Mention fsck_ffs -E in tunefs(8). It's non-obvious that one should
use it after enabling TRIM.

Reviewed by: brueffer@
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5928

8 years agoAdd PCI ID for family 10h model 30h to amdtemp(4).
loos [Tue, 19 Apr 2016 15:07:04 +0000 (15:07 +0000)]
Add PCI ID for family 10h model 30h to amdtemp(4).

This adds support to CPU found in PC Engines APU2 series.

MFC after: 3 weeks
Sponsored by: Rubicon Communications (Netgate)

8 years agoAdd driver for Xilinx AXI Quad SPI device. The device was found in
br [Tue, 19 Apr 2016 14:47:08 +0000 (14:47 +0000)]
Add driver for Xilinx AXI Quad SPI device. The device was found in
lowRISC hardware.

Sponsored by: DARPA, AFRL
Sponsored by: HEIF5

8 years agoAdd optional chip_select/deselect methods. This is required
br [Tue, 19 Apr 2016 14:18:12 +0000 (14:18 +0000)]
Add optional chip_select/deselect methods. This is required
when we want to keep CS asserted for multiple transfers.

8 years agoFix debugging printf.
trasz [Tue, 19 Apr 2016 13:36:31 +0000 (13:36 +0000)]
Fix debugging printf.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation

8 years agoFix umtx lock/trylock for compat32.
kib [Tue, 19 Apr 2016 11:37:43 +0000 (11:37 +0000)]
Fix umtx lock/trylock for compat32.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 11:12:57 +0000 (11:12 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 09:43:51 +0000 (09:43 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agohyperv/vmbus: Make device probe/attach synchronous w/ vmbus attach/SYSINIT
sephe [Tue, 19 Apr 2016 09:42:48 +0000 (09:42 +0000)]
hyperv/vmbus: Make device probe/attach synchronous w/ vmbus attach/SYSINIT

Discussed with: Jun Su <junsu microsoft com>, Dexuan Cui <decui microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agohyperv: Remove two assign-only local variables
sephe [Tue, 19 Apr 2016 09:25:56 +0000 (09:25 +0000)]
hyperv: Remove two assign-only local variables

Submitted by: Jun Su <junsu microsoft com>
MFC after: 1 week
Sponsored by: Microsoft OSTC

8 years agoFix build breakage introduced by r298253.
delphij [Tue, 19 Apr 2016 07:28:39 +0000 (07:28 +0000)]
Fix build breakage introduced by r298253.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 06:34:31 +0000 (06:34 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 06:32:35 +0000 (06:32 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoRename units.lib -> definitions.units
eadler [Tue, 19 Apr 2016 05:18:12 +0000 (05:18 +0000)]
Rename units.lib -> definitions.units
- this matches GNU units 2.12
add ISO country codes from units 2.12

8 years agoRename units.lib -> definitions.units
eadler [Tue, 19 Apr 2016 05:17:59 +0000 (05:17 +0000)]
Rename units.lib -> definitions.units
- this matches GNU units 2.12
add ISO country codes from units 2.12

8 years agoAdd VHT power envelope parsing to ifconfig.
adrian [Tue, 19 Apr 2016 05:17:43 +0000 (05:17 +0000)]
Add VHT power envelope parsing to ifconfig.

8 years agoRemove pathnames.h
eadler [Tue, 19 Apr 2016 05:04:39 +0000 (05:04 +0000)]
Remove pathnames.h
- it only holds a single constant
- it doesn't exist in the GNU variant

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 04:57:57 +0000 (04:57 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 04:52:51 +0000 (04:52 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 04:52:13 +0000 (04:52 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoRemove redundant parenthesis.
araujo [Tue, 19 Apr 2016 04:46:13 +0000 (04:46 +0000)]
Remove redundant parenthesis.

Submitted by: pfg
MFC after: 2 weeks.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 04:42:34 +0000 (04:42 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoUse nitems() from sys/param.h.
araujo [Tue, 19 Apr 2016 04:37:17 +0000 (04:37 +0000)]
Use nitems() from sys/param.h.

MFC after: 2 weeks.

8 years agoUse nitems() instead of sizeof(name) / sizeof(*name).
araujo [Tue, 19 Apr 2016 04:28:25 +0000 (04:28 +0000)]
Use nitems() instead of sizeof(name) / sizeof(*name).

MFC after: 2 weeks.

8 years agoAdd a new installation type to bsdinstall/zfsboot: BIOS+UEFI
allanjude [Tue, 19 Apr 2016 03:25:36 +0000 (03:25 +0000)]
Add a new installation type to bsdinstall/zfsboot: BIOS+UEFI

Installs both pmbr+gptzfsboot as well as boot1.efifat in separate partitions
The resulting system can be booted with either UEFI or BIOS/CSM.
Preference is controlled by the user's firmware boot settings.

This is now the default for zfsboot installs

PR: 208629
Submitted by: Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> (original version)

8 years agoUnbreak the build if you enable WITH_NAND
allanjude [Tue, 19 Apr 2016 02:06:02 +0000 (02:06 +0000)]
Unbreak the build if you enable WITH_NAND

Followup to r298230

Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com> (original version)
Sponsored by: ScaleEngine Inc.

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 02:05:32 +0000 (02:05 +0000)]
Use NULL instead of 0 for pointers.

realloc will return NULL in case it cannot allocate memory.

MFC after: 2 weeks.

8 years agomalloc will return NULL if it cannot allocate memory.
araujo [Tue, 19 Apr 2016 02:00:48 +0000 (02:00 +0000)]
malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agogetfsent(3) will return NULL on EOF or error.
araujo [Tue, 19 Apr 2016 01:59:26 +0000 (01:59 +0000)]
getfsent(3) will return NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 01:57:56 +0000 (01:57 +0000)]
Use NULL instead of 0 for pointers.

malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agoFix SMP booting for PowerPC Book-E
jhibbits [Tue, 19 Apr 2016 01:48:18 +0000 (01:48 +0000)]
Fix SMP booting for PowerPC Book-E

Summary:
PowerPC Book-E SMP is currently broken for unknown reasons.  Pull in
Semihalf changes made c2012 for e500mc/e5500, which enables booting SMP.

This eliminates the shared software TLB1 table, replacing it with
tlb1_read_entry() function.

This does not yet support ePAPR SMP booting, and doesn't handle resetting CPUs
already released (ePAPR boot releases APs to a spin loop waiting on a specific
address).  This will be addressed in the near future by using the MPIC to reset
the AP into our own alternate boot address.

This does include a change to the dpaa/dtsec(4) driver, to mark the portals as
CPU-private.

Test Plan:
Tested on Amiga X5000/20 (P5020).  Boots, prints the following
messages:

 Adding CPU 0, pir=0, awake=1
 Waking up CPU 1 (dev=1)
 Adding CPU 1, pir=20, awake=1
 SMP: AP CPU #1 launched

top(1) shows CPU1 active.

Obtained from: Semihalf
Relnotes: Yes
Differential Revision: https://reviews.freebsd.org/D5945

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 01:25:35 +0000 (01:25 +0000)]
Use NULL instead of 0 for pointers.

dbopen(3) will returns a NULL on error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0.
araujo [Tue, 19 Apr 2016 01:01:22 +0000 (01:01 +0000)]
Use NULL instead of 0.

malloc will return NULL in case it cannot allocate memory.

MFC after: 2 weeks.

8 years agoUse NULL for pointers instead of 0.
araujo [Tue, 19 Apr 2016 00:59:15 +0000 (00:59 +0000)]
Use NULL for pointers instead of 0.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Tue, 19 Apr 2016 00:40:43 +0000 (00:40 +0000)]
Use NULL instead of 0 for pointers.

kvm_open(3) will return NULL when it cannot access kernel virtual memory.

MFC after: 2 weeks.

8 years agoUse NULL for pointers instead of 0.
araujo [Tue, 19 Apr 2016 00:38:07 +0000 (00:38 +0000)]
Use NULL for pointers instead of 0.

MFC after: 2 weeks.

8 years agohptmv(4) Fix potential buffer overflow in hpt_set_info.
sbruno [Mon, 18 Apr 2016 23:26:11 +0000 (23:26 +0000)]
hptmv(4) Fix potential buffer overflow in hpt_set_info.

While here, adjust some whitespace and yeild some useful debug info.

This is untested on this hardware, testing requests to -scsi went
unanswered.

PR: 206585
Submitted by: cturt@hardenedbsd.org
MFC after: 2 weeks

8 years agoA new implementation of the loader block cache
allanjude [Mon, 18 Apr 2016 23:09:22 +0000 (23:09 +0000)]
A new implementation of the loader block cache

The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy.
Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks.
Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device.
The cache also implements limited read-ahead to increase performance.
To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.

Booting from a virtual CD over IPMI:
0ms latency, before: 27 second, after: 7 seconds
60ms latency, before: over 12 minutes, after: under 5 minutes.

Submitted by: Toomas Soome <tsoome@me.com>
Reviewed by: delphij (previous version), emaste (previous version)
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D4713

8 years agoAllow -f dirdeps.mk some/dir with no TARGET_MACHINE spec
sjg [Mon, 18 Apr 2016 22:00:26 +0000 (22:00 +0000)]
Allow -f dirdeps.mk some/dir with no TARGET_MACHINE spec

Use $MACHINE if target does not specify.

Reviewed by: bdrewery

8 years agoMETA_MODE: Don't hide the .depend rm -f command.
bdrewery [Mon, 18 Apr 2016 21:11:55 +0000 (21:11 +0000)]
META_MODE: Don't hide the .depend rm -f command.

Otherwise the build command changes every build.  META_MODE will
only remove it if something changes to warrant rebuilding
the file.

Sponsored by: EMC / Isilon Storage Division

8 years agoUpdate meta2deps to fix crash when using -X with M2D_EXCLUDES.
bdrewery [Mon, 18 Apr 2016 21:05:19 +0000 (21:05 +0000)]
Update meta2deps to fix crash when using -X with M2D_EXCLUDES.

8 years agolibc: do not include <sys/types.h> where <sys/param.h> was already included
avos [Mon, 18 Apr 2016 21:05:15 +0000 (21:05 +0000)]
libc: do not include <sys/types.h> where <sys/param.h> was already included

According to style(9):
> normally, include <sys/types.h> OR <sys/param.h>, but not both.
(<sys/param.h> already includes <sys/types.h> when LOCORE is not defined).

8 years agoUpdate dirdeps.mk et al
sjg [Mon, 18 Apr 2016 20:56:21 +0000 (20:56 +0000)]
Update dirdeps.mk et al

dirdeps.mk: move logic to handle -f dirdeps.mk to inside check
for first read of dirdeps.mk

Also fix handling of WITHOUT_DIRDEPS_BELOW

gendirdeps.mk: pass M2D_EXCLUDES to meta2deps

meta.autodep.mk: if we build with nofilemon, leave a cookie to
prevent updating dependencies until cleaned.

Reviewed by: bdrewery

8 years agoCorrect possible underflow conditions when checking for available space
sbruno [Mon, 18 Apr 2016 20:33:44 +0000 (20:33 +0000)]
Correct possible underflow conditions when checking for available space
in the tx h/w ring buffer.

Reviewed by: gnn jeb.j.cramer@intel.com
MFC after: 1 week
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D5918

8 years agoAddress issues found by the XCode code analyzer.
tuexen [Mon, 18 Apr 2016 20:16:41 +0000 (20:16 +0000)]
Address issues found by the XCode code analyzer.

8 years agoAdd MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
gjb [Mon, 18 Apr 2016 19:27:51 +0000 (19:27 +0000)]
Add MK_AUTO_OBJ=no to ${MAKE} invocation if PKG_VERSION needs to be
created to avoid creating ${.OBJDIR}.

The duplicate REVISION/BRANCH/VERSION evaluation will be addressed
separately.

Sponsored by: The FreeBSD Foundation

8 years agoFollow-up r298220: Don't pass down META_MODE which will still enable it.
bdrewery [Mon, 18 Apr 2016 18:39:43 +0000 (18:39 +0000)]
Follow-up r298220: Don't pass down META_MODE which will still enable it.

Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Disable during installworld and similar.
bdrewery [Mon, 18 Apr 2016 18:14:05 +0000 (18:14 +0000)]
META_MODE: Disable during installworld and similar.

META_MODE may create cookies during staging of files to WORLDTMP that would
also prevent installation of the files to the final DESTDIR, since the cookie
already exists.  This is not yet the case but will be soon.  Prevent other
similar issues by disabling META_MODE for any top-level install targets.

Sponsored by: EMC / Isilon Storage Division

8 years agoCause an error during 'make install' if trying to compile with CC.
bdrewery [Mon, 18 Apr 2016 18:14:02 +0000 (18:14 +0000)]
Cause an error during 'make install' if trying to compile with CC.

This is limited to src-tree builds, meaning not extended to ports or other
out-of-tree builds.

This will help ensure that read-only OBJDIRS will be respected at install-time
by causing a more consistent failure for those who don't use a read-only
OBJDIR.  It also will cause Jenkins to yell.  This is a better solution than
trying to see CC=false as has been attempted and discussed before.

Of course this is only relevant for files generated by CC.

Disable this for META_MODE since it will detect the CFLAGS/command
change and force a rebuild.

Sponsored by: EMC / Isilon Storage Division

8 years agoFollow-up r297842: Rework header generation to fix always rebuilding.
bdrewery [Mon, 18 Apr 2016 18:13:58 +0000 (18:13 +0000)]
Follow-up r297842: Rework header generation to fix always rebuilding.

This reworks the handling of common headers to just include the needed
logic rather than invoke MAKE.  This avoids the problem listed in r297842
and avoids other dependency tracking issues.

Pointyhat to: bdrewery
Reported by: Nikolai Lifanov <lifanov@mail.lifanov.com>
Sponsored by: EMC / Isilon Storage Division

8 years agoMETA_MODE: Clean .meta files with 'make cleandepend'.
bdrewery [Mon, 18 Apr 2016 18:12:12 +0000 (18:12 +0000)]
META_MODE: Clean .meta files with 'make cleandepend'.

Sponsored by: EMC / Isilon Storage Division

8 years agoReuse our roundup2() macro instead of reinventing the wheel.
pfg [Mon, 18 Apr 2016 17:30:33 +0000 (17:30 +0000)]
Reuse our roundup2() macro instead of reinventing the wheel.

Obtained from: DragonflyBSD

8 years agoRe-use our roundup2() macro instead of reinventing the wheel.
pfg [Mon, 18 Apr 2016 16:25:37 +0000 (16:25 +0000)]
Re-use our roundup2() macro instead of reinventing the wheel.

Obtained from: DragonflyBSD

8 years agolibipsec: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 15:08:31 +0000 (15:08 +0000)]
libipsec: use NULL instead of zero for pointers.

8 years agorbootd: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 15:05:48 +0000 (15:05 +0000)]
rbootd: use NULL instead of zero for pointers.

8 years agoAdd the ability to read a SAS device's Target Port NAA designator
asomers [Mon, 18 Apr 2016 15:01:59 +0000 (15:01 +0000)]
Add the ability to read a SAS device's Target Port NAA designator

sys/cam/scsi/scsi_all.h
sys/cam/scsi/scsi_all.c
Add the scsi_devid_is_port_naa helper function

Reviewed by: ken
MFC after: 4 weeks
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D5975

8 years agoftpd: replace malloc + memset 0 with calloc.
pfg [Mon, 18 Apr 2016 15:01:49 +0000 (15:01 +0000)]
ftpd: replace malloc + memset 0 with calloc.

It is faster and usually safer.
Use NULL instead of zero for the pointer.

8 years agolibstand: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 14:45:56 +0000 (14:45 +0000)]
libstand: use NULL instead of zero for pointers.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 14:44:01 +0000 (14:44 +0000)]
Use NULL instead of 0 for pointers.

strchr(3) will return NULL if the character does not appear in the
string.

MFC after: 2 weeks.

8 years agolibbluetooth: use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 14:41:30 +0000 (14:41 +0000)]
libbluetooth: use NULL instead of zero for pointers.

8 years agorexec(3): use NULL instead of zero for pointers.
pfg [Mon, 18 Apr 2016 14:37:26 +0000 (14:37 +0000)]
rexec(3): use NULL instead of zero for pointers.

8 years agoUser NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 14:12:42 +0000 (14:12 +0000)]
User NULL instead of 0 for pointers.

gethostbyname(3) will return NULL in case of an error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 14:08:35 +0000 (14:08 +0000)]
Use NULL instead of 0 for pointers.

strchr(3) will return NULL if the character does not appear in the
string.

MFC after: 2 weeks.

8 years agoReplace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain
emaste [Mon, 18 Apr 2016 13:13:59 +0000 (13:13 +0000)]
Replace ${CURDIR}/../.. with ${CURDIR:H:H} in elftoolchain

This produces a nicer path in debug info and build logs.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

8 years agoFix signed/unsigned warnings.
tuexen [Mon, 18 Apr 2016 11:39:41 +0000 (11:39 +0000)]
Fix signed/unsigned warnings.

8 years agoPull the MSI/MSI-X handling functions out to help with INTRNG integration.
andrew [Mon, 18 Apr 2016 10:37:50 +0000 (10:37 +0000)]
Pull the MSI/MSI-X handling functions out to help with INTRNG integration.

Obtained from: ABT Systems Ltd
Sponsored by: The FreeBSD Foundation

8 years agoFixed indentation, minor style.
pluknet [Mon, 18 Apr 2016 09:56:41 +0000 (09:56 +0000)]
Fixed indentation, minor style.

8 years agoFix a warning about an unused variable.
tuexen [Mon, 18 Apr 2016 09:39:46 +0000 (09:39 +0000)]
Fix a warning about an unused variable.

8 years agoPut panic() calls under INVARIANTS.
tuexen [Mon, 18 Apr 2016 09:29:14 +0000 (09:29 +0000)]
Put panic() calls under INVARIANTS.

8 years agoFix tinderbox LINT build.
delphij [Mon, 18 Apr 2016 08:24:13 +0000 (08:24 +0000)]
Fix tinderbox LINT build.

8 years agoMinor cosmetic cleanup
ngie [Mon, 18 Apr 2016 07:48:27 +0000 (07:48 +0000)]
Minor cosmetic cleanup

- Remove spurious trailing whitespace in licensing header
- Remove unnecessary semi-colon after comment [*]

MFC after: 3 days
Submitted by: pfg [*]
Sponsored by: EMC / Isilon Storage Division

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:47:26 +0000 (07:47 +0000)]
Use NULL instead of 0 for pointers.

malloc will return NULL if it cannot allocate memory.

MFC after: 2 weeks.

8 years agostrchr(3) will return NULL if it cannot find the character in the
araujo [Mon, 18 Apr 2016 07:44:53 +0000 (07:44 +0000)]
strchr(3) will return NULL if it cannot find the character in the
string.
getfsent(3) will return NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:40:36 +0000 (07:40 +0000)]
Use NULL instead of 0 for pointers.

strchr(3) will return NULL if the character does not appear in the
string.

MFC after: 2 weeks.

8 years agoMFV r298178:
delphij [Mon, 18 Apr 2016 07:36:24 +0000 (07:36 +0000)]
MFV r298178:

Update file to 5.26.

MFC after: 2 weeks
Relnotes: yes

8 years agoUser NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:14:01 +0000 (07:14 +0000)]
User NULL instead of 0 for pointers.

getservent(3) returns NULL on EOF or error.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:09:34 +0000 (07:09 +0000)]
Use NULL instead of 0 for pointers.

fopen(3) will return NULL in case it cannot open the STREAM.

MFC after: 2 weeks.

8 years agoUse NULL instead of 0 for pointers.
araujo [Mon, 18 Apr 2016 07:05:18 +0000 (07:05 +0000)]
Use NULL instead of 0 for pointers.

MFC after: 2 weeks.

8 years agoCleanup debug output.
tuexen [Mon, 18 Apr 2016 06:58:07 +0000 (06:58 +0000)]
Cleanup debug output.

8 years agoDon't use anonymous unions.
tuexen [Mon, 18 Apr 2016 06:38:53 +0000 (06:38 +0000)]
Don't use anonymous unions.