aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
Commit message (Collapse)AuthorAgeFilesLines
* The malloc will return NULL if it can't allocate memory.Marcelo Araujo2016-04-181-1/+1
| | | | | | | MFC after: 2 weeks. Notes: svn path=/head/; revision=298180
* Use nitems instead of 'sizeof(mapnames) / sizeof(mapnames[0]'.Marcelo Araujo2016-04-181-2/+2
| | | | Notes: svn path=/head/; revision=298177
* Use the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead ofBaptiste Daroussin2016-04-161-8/+3
| | | | | | | | | calling fcntl(2) MFC after: 1 week Notes: svn path=/head/; revision=298114
* Use pipe2(2) to directly set the close-on-exec flags directlyBaptiste Daroussin2016-04-161-6/+1
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=298111
* MFHGlen Barber2016-04-1621-55/+143
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=298092
| * Cleanup unnecessary semicolons from utilities we all love.Pedro F. Giffuni2016-04-158-10/+10
| | | | | | | | Notes: svn path=/head/; revision=298089
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | fgetln(3) will returns NULL if cannot get a line from a stream. strsep(3) it will returns NULL if the end of the string was reached. jemalloc(3) malloc will returns NULL if it cannot allocate memory. fgetln(3) it will returns NULL if it cannot get a line from a stream. MFC after: 4 weeks Notes: svn path=/head/; revision=298033
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-152-2/+2
| | | | | | | | | | | | | | | | | | | | | | getenv(3) returns NULL if the variable name is not in the current environment. getservent(3) returns NULL on EOF or error MFC after: 4 weeks Notes: svn path=/head/; revision=298032
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-151-3/+3
| | | | | | | | | | | | | | | | | | fopen(3) returns NULL in case it can't open the STREAM. fgetln(3) returns NULL if it can't get a line from a STREAM. malloc returns NULL if it can't allocate memory. Notes: svn path=/head/; revision=298028
| * Use NULL instead of 0 for pointers and memory allocation.Marcelo Araujo2016-04-151-3/+3
| | | | | | | | | | | | | | | | | | malloc and realloc will return NULL pointer if it can't alloc memory. MFC after: 4 weeks Notes: svn path=/head/; revision=298021
| * Remove a link to the CTM section of the Handbook, which no longer exists.Warren Block2016-04-141-6/+1
| | | | | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=298005
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-141-1/+1
| | | | | | | | | | | | | | fopen(3) will return NULL in case it can't open the STREAM. Notes: svn path=/head/; revision=297965
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-141-1/+1
| | | | | | | | | | | | | | | | The malloc will return a pointer to the allocated memory if successful, otherwise a NULL pointer is returned. Notes: svn path=/head/; revision=297964
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-142-3/+3
| | | | | | | | | | | | | | | | The strchr(3) returns a NULL if the character does not appears in the string. The malloc will return NULL if cannot allocate memory. Notes: svn path=/head/; revision=297962
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-141-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | fopen(3) will return NULL in case it can't open the STREAM. The malloc will return a pointer to the allocated memory if successful, otherwise a NULL pointer is returned. Also add an extra DEBUG1 to print out the error to open a file. Reviewed by: ed Differential Revision: https://svnweb.freebsd.org/changeset/base/297959 Notes: svn path=/head/; revision=297961
| * Use NULL instead of 0 for pointers.Marcelo Araujo2016-04-141-1/+1
| | | | | | | | | | | | | | | | | | fopen(3) returns a FILE pointer, otherwise NULL is returned. MFC after: 2 weeks Notes: svn path=/head/; revision=297959
| * Handle PBA that shares a page with MSI-X table for passthrough devices.John Baldwin2016-04-132-14/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | If the PBA shares a page with the MSI-X table, map the shared page via /dev/mem and emulate accesses to the portion of the PBA in the shared page by accessing the mapped page. Reviewed by: grehan MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D5919 Notes: svn path=/head/; revision=297932
* | MFHGlen Barber2016-04-133-39/+26
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297927
| * Convert ypldap_addr list to a tailq(queue(3)).Marcelo Araujo2016-04-133-39/+26
| | | | | | | | | | | | | | Obtained from: OpenBSD r1.11, r1.17 and r1.36 Notes: svn path=/head/; revision=297907
* | MFHGlen Barber2016-04-131-0/+9
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297906
| * Apply revisions 1.4 and 1.5 from ldapd's ber.c to ypldap's copy, so it canMarcelo Araujo2016-04-131-0/+9
| | | | | | | | | | | | | | | | | | deal with messages that haven't been fully read from the server yet. Obtained from: OpenBSD r1.11 Notes: svn path=/head/; revision=297903
* | MFHGlen Barber2016-04-121-1/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297861
| * Make the usage() mention the -u option added in r295212.Edward Tomasz Napierala2016-04-121-1/+1
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=297860
* | MFHGlen Barber2016-04-1111-27/+31
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297824
| * lpr: replace 0 with NULL for pointers.Pedro F. Giffuni2016-04-108-23/+23
| | | | | | | | | | | | | | | | | | Found with devel/coccinelle. Reviewed by: gad Notes: svn path=/head/; revision=297795
| * Allow the location of the kernel source tree to be overridden.Peter Grehan2016-04-101-1/+3
| | | | | | | | | | | | | | | | This makes it easier for the bhyve executable to be built out of the tree. Notes: svn path=/head/; revision=297778
| * bsdinstall/zfsboot should create /tmp and /var/tmp if they do not existAllan Jude2016-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | PR: 208629 PR: 208568 Submitted by: Galael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks Notes: svn path=/head/; revision=297713
| * Do not add swap to fstab when swapsize is 0Allan Jude2016-04-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If a user requested encrypted swap, but 0 sized, it would still be added to fstab PR: 208630 Submitted by: Ganael LAPLANCHE <ganael.laplanche@corp.ovh.com> MFC after: 2 weeks Sponsored by: ScaleEngine Inc. Notes: svn path=/head/; revision=297712
| * Chase r296204 by renaming tzsetup(1) to tzsetup(8) in the testsEnji Cooper2016-04-061-1/+1
| | | | | | | | | | | | | | | | | | MFC after: 3 days X-MFC with: r296204 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=297606
* | MFHGlen Barber2016-04-062-7/+2
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297605
| * bhyveload: fix from loading undefined size.Pedro F. Giffuni2016-04-061-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | We were setting an incorrect/undefined size and as it came out the st struct was not really being used at all. This was actually a bug but by sheer luck it had no visual effect. CID: 1194320 Reviewed by: grehan Notes: svn path=/head/; revision=297599
| * bhyve: Remove unneeded variable ncq.Pedro F. Giffuni2016-04-051-5/+1
| | | | | | | | | | | | | | | | | | | | | | ncq was not being inititialized properly but it was not actually necessary either, so make the code smaller by removing it. CID: 1248842 Reviewed by: grehan Notes: svn path=/head/; revision=297589
* | MFHGlen Barber2016-04-0423-144/+211
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=297567
| * Output information about PCI-e devices with slots.John Baldwin2016-04-021-2/+42
| | | | | | | | | | | | | | | | In particular this includes additional information on HotPlug capable slots. Notes: svn path=/head/; revision=297501
| * Various updates to the PCI-express capability output.John Baldwin2016-04-021-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Group the output so that it follows the capability register set more closely. The first line now contains device information and the second line contains link information. As a result, ARI status is now output on the first line, and the link width is moved down to the second line of link information. - Only read the DEVICE_CAP2 register to check for ARI if the capability version is >= 2. - Don't output any link information if the link capability and status registers are zero. - Label the MSI interrupt index value as "MSI" instead of "IRQ". Notes: svn path=/head/; revision=297500
| * mtest: Prevent access to uninitialized value.Pedro F. Giffuni2016-04-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | case 'g' makes use of value n, which is initialized for case 'b' and passe through to case 'g'. If case 'g' is called directly value 'n' is not initialized. Avoid the issue by initializing n before entering the switch. CID: 1006375 Reviewed by: bms Notes: svn path=/head/; revision=297477
| * pci_emul_dior(): fix uninitialized scalar variable.Pedro F. Giffuni2016-03-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | Prevent from returning an unitialized value in case the ior size is unknown. CID: 1194319 Reviewed by: grehan Notes: svn path=/head/; revision=297472
| * Remove the old depend (mkdep) code and make FAST_DEPEND the one true way.Bryan Drewery2016-03-301-5/+0
| | | | | | | | | | | | | | | | | | | | Reviewed by: emaste, hselasky (partial), brooks (brief) Discussed on: arch@ Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5742 Notes: svn path=/head/; revision=297434
| * Adjust misleading wording of the -G option and simplify a fewWarren Block2016-03-281-11/+9
| | | | | | | | | | | | | | | | | | surrounding sentences. From a discussion on -ports. Reviewed by: David Wolfskill <david@catwhisker.org> Notes: svn path=/head/; revision=297330
| * Cleanup headersBaptiste Daroussin2016-03-262-5/+0
| | | | | | | | | | | | | | Found by: include-what-you-use Notes: svn path=/head/; revision=297291
| * Remove some unneeded headersBaptiste Daroussin2016-03-264-7/+0
| | | | | | | | | | | | | | Found by 'include-what-you-use' Notes: svn path=/head/; revision=297290
| * fix incorrect usage of hid_set_data() which causes crashMaksim Yevmenkin2016-03-231-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | in bthidd(8) on amd64 WITH_SSP builds Submitted by: rakuco Reviewed by: rakuco Tested by: rakuco MFC after: 1 week Notes: svn path=/head/; revision=297217
| * Implement suggestion by jhb@ to have _PATH_FIRMWARE instead of hardWarner Losh2016-03-231-1/+1
| | | | | | | | | | | | | | coding it to be "/usr/share/firmware". Notes: svn path=/head/; revision=297205
| * Use uintmax_t (typedef'd to rman_res_t type) for rman ranges.Justin Hibbits2016-03-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some architectures, u_long isn't large enough for resource definitions. Particularly, powerpc and arm allow 36-bit (or larger) physical addresses, but type `long' is only 32-bit. This extends rman's resources to uintmax_t. With this change, any resource can feasibly be placed anywhere in physical memory (within the constraints of the driver). Why uintmax_t and not something machine dependent, or uint64_t? Though it's possible for uintmax_t to grow, it's highly unlikely it will become 128-bit on 32-bit architectures. 64-bit architectures should have plenty of RAM to absorb the increase on resource sizes if and when this occurs, and the number of resources on memory-constrained systems should be sufficiently small as to not pose a drastic overhead. That being said, uintmax_t was chosen for source clarity. If it's specified as uint64_t, all printf()-like calls would either need casts to uintmax_t, or be littered with PRI*64 macros. Casts to uintmax_t aren't horrible, but it would also bake into the API for resource_list_print_type() either a hidden assumption that entries get cast to uintmax_t for printing, or these calls would need the PRI*64 macros. Since source code is meant to be read more often than written, I chose the clearest path of simply using uintmax_t. Tested on a PowerPC p5020-based board, which places all device resources in 0xfxxxxxxxx, and has 8GB RAM. Regression tested on qemu-system-i386 Regression tested on qemu-system-mips (malta profile) Tested PAE and devinfo on virtualbox (live CD) Special thanks to bz for his testing on ARM. Reviewed By: bz, jhb (previous) Relnotes: Yes Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D4544 Notes: svn path=/head/; revision=297000
| * Remove 50% ZFS conditional from bsdinstall/zfsbootAllan Jude2016-03-171-5/+5
| | | | | | | | | | | | | | | | | | | | | | Remove the requirement that the resulting partition table be atleast 50% ZFS PR: 208094 Requested by: brooks Sponsored by: ScaleEngine Inc. Notes: svn path=/head/; revision=296988
| * kbdcontrol: add -P path option to add keymap search pathsEd Maste2016-03-162-23/+73
| | | | | | | | | | | | | | | | | | | | PR: 193865 Reviewed by: cem Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5645 Notes: svn path=/head/; revision=296926
| * Make fail() preserve the errno.Edward Tomasz Napierala2016-03-151-1/+5
| | | | | | | | | | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296898
| * Use the log_errno value passed to the function instead of the errno globalEdward Tomasz Napierala2016-03-153-18/+27
| | | | | | | | | | | | | | | | | | | | | | variable. Suggested by: Daniel Braniss MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=296897
| * Just install ar5523.bin into /usr/share/firmware and stop compiling itWarner Losh2016-03-153-36/+16
| | | | | | | | | | | | | | | | | | in. Differential Review: https://reviews.freebsd.org/D5639 Notes: svn path=/head/; revision=296889
* | MFHGlen Barber2016-03-1414-82/+169
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296869