Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
No functional change intended.
Fix a clang 4.0.0 warning about taking the address of a packed member of
struct mfi_evt in mfiutil:
usr.sbin/mfiutil/mfi_evt.c:583:30: error: taking address of packed
member 'members' of class or structure 'mfi_evt' may result in an
unaligned pointer value [-Werror,-Waddress-of-packed-member]
if (parse_locale(optarg, &filter.members.locale) < 0) {
^~~~~~~~~~~~~~~~~~~~~
Use a local variable instead, and copy that into the struct.
Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D9069
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.
Still need to add real targets under targets/ to build packages.
Differential Revision: D2796
Reviewed by: brooks imp
in not showing the most recent event by default.
- When the stop even is hit, break out of the outer loop to stop fetching
more events.
MFC after: 1 week
terminology).
Adds command "mfiutil syspd <drive#>" to change a drive to SYSPD. Drive
will then be scanned/reported immediately as /dev/mfisyspdX by the host.
"mfiutil good <drive#>" clears SYSPD mode, remove /dev/mfisyspdX and
sets disk into UNCONFIGURED mode.
Tested on Dell H310 SAS/SATA RAID controller.
MFC after: 2 weeks
Sponsored by: Yahoo! Inc.
relearning. Specifically, add subcommands to mfiutil(8) which allow the
user to set the BBU and autolearn modes when the firmware supports it,
and add a subcommand which kicks off a battery relearn.
Reviewed by: sbruno, rstone
Tested by: sbruno
Approved by: rstone (co-mentor)
MFC after: 2 weeks
Sponsored by: Sandvine Incorporated
In addition to adding `static' where possible:
- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.
Remove the magic mfi_array is 288 bytes and just use the
sizeof the array since it is not 288 bytes.
Change reporting of a "SYSTEM" disk to "JBOD" to match
LSI MegaCli and firmware reporting.
This means that fiutil command to "create jbod" is now a
little confusing since a RAID per drive is not really what
LSI defines JBOD to be. This should be fixed in the future
and support added to really create LSI JBOD and enable that
feature on cards that support it.
make the mfi_array 288 bytes, remove this magic number and the
calculations that go with it. Use the MFI_MAX_ROW_SIZE and
sizeof(struct mfi_array) in place of the prior calculations.
Change reporting a disk as "SYSTEM" when it is a "JBOD" reported
by the firmware and MegaCli. A JBOD appears as /dev/mfisyspd<n>.
This also means the mfiutil command to "create jbod" is now a
little confusing since a RAID per drive is not really what LSI
defines JBOD to be. In the future mfiutil should have an option
to create real JBOD's and enable that option in RAID controllers
that support it. In testing, it appears the RAID cache is not
used with JBOD but is with the RAID per disk. When this is
implemented more testing should be done to determine the pro's and
con's of JBOD versus RAID per disk.
Reviewed by: jhb
items. While parsing the arrays input, it's possible that we reach the
error path before initializing the 'arrays' pointer, which in turn leads
to a NULL deference.
Submitted by: Garrett Cooper
MFC after: 1 week
When a status pointer is passed in mfi_dcmd_command does not return an
errno (if the ioctl is successful), so move the test for NO_HW_PRESENT
outside of the error case. This should fix incorrect reporting for
systems with a dead or no battery.
Additionally, handle error codes other than NO_HW_PRESENT by omitting
the battery capacity display. LSI's supercap-based parts (CV series)
report their data using the same interface as battery-based parts,
except that they do not include the capacity stats (state of charge,
cumulative charge cycles, etc.)
Reviewd by: jhb, bz
Tested by: pluknet@, Garrett Cooper
PR: bin/160581
MFC after: 1 week
and use a loop so that multiple cache commands can be strung together on
the command line into a single update to the volume's properties.
Reviewed by: bz
Approved by: re (kib)
MFC after: 1 week
new line after the pd state information as well, so move it to the outside
of the block.
Submitted by: Mark Johnston at Sandvine Inc
MFC atfer: 3 days
Approved by: re (kib)
data when 'show drives' succeeds, often resulting in a failing exit code
even though the command worked fine.
Reviewed by: bz
Approved by: re (kib)
MFC after: 3 days