History log of /freebsd-current/usr.sbin/mfiutil/mfi_evt.c
Revision Date Author Comments
# b3e76948 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: two-line .h pattern

Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/


# 7e0f8b79 24-Aug-2022 Doug Ambrisko <ambrisko@FreeBSD.org>

Add mrsasutil(8) as alias to mfiutil(8)

mfiutil(8) in theory can work on devices attached to mrsas(4) but
mrsas(4) is missing the FreeBSD mfi(4) ioctl support. Once that
support is added to mrsas(4) then mrsasutil(8) can manage mrsas(4)
attached devices. So this commit depends on that. When mrsasutil(8)
is run it automatically opens /dev/mrsas0 instead of /dev/mfi0.
Add -D <device> and -t <type> flag to optionally specify mrsas or mfi to
work with the existing -u <unit>. Device is the device node with or
without /dev/

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265794
Differential Revision: https://reviews.freebsd.org/D36343
Tested by: Dan Mahoney <freebsd@gushi.org>
Reviewed by: jhb


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

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.


# 3ac0e476 09-Jan-2017 Dimitry Andric <dim@FreeBSD.org>

Avoid taking the address of a packed struct member in mfiutil

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


# 186ddf96 22-Apr-2014 John Baldwin <jhb@FreeBSD.org>

- Fix an off by one error when checking for the stop event. This resulted
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


# 41b8cbda 19-Jun-2012 Eitan Adler <eadler@FreeBSD.org>

Add __unused macros to appropriate places in order to allow building
with WARNS=6 on base gcc, gcc46, and clang

Approved by: cperciva
MFC after: 1 week


# bf4ec4df 19-Jun-2012 Eitan Adler <eadler@FreeBSD.org>

Allow users with RO privilege to the device to read the RO attributes.

PR: bin/167302
Submitted by: markham breitbach <markham@ssimicro.com>
Discussed with: pjd (briefly)
Approved by: cperciva
MFC after: 1 week


# 1b202316 05-Dec-2011 John Baldwin <jhb@FreeBSD.org>

Use the correct volume identifier field when parsing MR_EVT_ARG_LD_STRIP
arguments.

MFC after: 2 weeks


# 375c4656 09-Jun-2011 Bjoern A. Zeeb <bz@FreeBSD.org>

Contrary to when returning in all-good cases at the end of functions we
did not free memory (1) or close the file descriptor (2) in error cases.

Reported by: Mark Johnston (1)
Reported by: attilio (2)
Reviewed by: jhb
Sponsored by: Sandvine Incorporated
MFC after: 1 week


# aacea6e2 01-Jun-2011 Ed Maste <emaste@FreeBSD.org>

There are a couple of structs in mfireg.h with members named 'class'.
These cause problems when trying to include the header in a C++ project.
Rename them to 'evt_class', and track the change in mfi and mfiutil.

Submitted by: Mark Johnston
Sponsored by: Sandvine Incorporated
Reviewed by: jhb@
MFC after: 1 week


# 3c22a809 19-Nov-2010 John Baldwin <jhb@FreeBSD.org>

Handle malloc() failures more gracefully by error'ing out rather than
segfaulting.

Submitted by: gcooper
MFC after: 1 week


# c02999d9 26-Oct-2010 John Baldwin <jhb@FreeBSD.org>

- Save errno values before calling warn(3) so that errors are correctly
reported.
- Use powerof2() from <sys/param.h> rather than a copy and paste version.

Submitted by: gcooper
MFC after: 1 week


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 42eeb00e 17-Aug-2009 Scott Long <scottl@FreeBSD.org>

Merge mfiutil

Approved by: re


# 763fae79 13-Aug-2009 Scott Long <scottl@FreeBSD.org>

ntroduce mfiutil, a basic utility for managing LSI SAS-RAID & Dell PERC5/6
controllers. Controller, array, and drive status can be checked, basic
attributes can be changed, and arrays and spares can be created and deleted.
Controller firmware can also be flashed.

This does not replace MegaCLI, found in ports, as that is officially sanctioned
and supported by LSI and includes vastly more functionality. However, mfiutil
is open source and guaranteed to provide basic functionality, which can be
especially useful if you have a problem and can't get MegaCLI to work.

Approved by: re
Obtained from: Yahoo! Inc.