Commit graph

84 commits

Author SHA1 Message Date
Elyes Haouas 44cf844b16 tree: Use 1 semicolon at the end of a statement
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/889
2023-12-27 21:05:56 -07:00
Warner Losh fa9896e082 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
2023-08-16 11:55:10 -06:00
Warner Losh d0b2dbfa0e Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
2023-08-16 11:55:03 -06:00
Warner Losh b3e7694832 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
2023-08-16 11:54:16 -06:00
Warner Losh ed96987b4c mfiuitl: Spell acquire correctly 2023-06-01 20:33:42 -06:00
Elyes Haouas 56ca9ef092 mfiutil: Fix typos
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/653
2023-06-01 20:33:41 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Doug Ambrisko 7e0f8b79b7 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
2023-05-05 09:20:48 -07:00
Simon J. Gerraty d9a4274795 Update/fix Makefile.depend for userland 2023-04-18 17:14:23 -07:00
Gordon Bergling 75f8dcc831 mfiutil.8: Fix some mandoc warnings
- new sentence, new line
- no blank before trailing delimiter

MFC after:	3 days
2022-08-07 17:24:48 +02:00
Allan Jude 84cf7c1df7 Make mfiutil show progress print out the elapsed time estimate in a
more humanized way

PR:		225993
Submitted by:	Enji Cooper <yaneurabeya@gmail.com>
Reviewed by:	jhb (previous version)
Approved by:	re (rgrimes)
2018-10-13 02:21:23 +00:00
Pedro F. Giffuni 1de7b4b805 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.
2017-11-27 15:37:16 +00:00
Bryan Drewery ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Dimitry Andric 3ac0e4769e 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
2017-01-09 19:39:35 +00:00
Eitan Adler 463a577b27 Fix a ton of speelling errors
arc lint is helpful

Reviewed By: allanjude, wblock, #manpages, chris@bsdjunk.com
Differential Revision: https://reviews.freebsd.org/D3337
2015-10-21 05:37:09 +00:00
Ed Maste e2a78b0008 mfiutil: increase buffer size to accommodate sprintf string
PR:		201289
MFC after:	1 week
2015-07-03 01:43:11 +00:00
Simon J. Gerraty ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty 44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty 98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Baptiste Daroussin c6db8143ed Convert usr.sbin to LIBADD
Reduce overlinking
2014-11-25 16:57:27 +00:00
Simon J. Gerraty 9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Steven Hartland 92958cd02d Style (9) fixes, spaces to tabs.
Fix style issues noticed when I went to MFC r257820

MFC after:	2 days
X-MFC-With:	r257820
Sponsored by:	Multiplay
2014-09-19 23:38:44 +00:00
Simon J. Gerraty fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty 76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty 3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
John Baldwin 186ddf9631 - 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
2014-04-22 15:17:32 +00:00
John Baldwin 4099f0ec42 Don't claim the adapter is idle if it is clearing a drive.
MFC after:	1 week
2014-04-22 15:15:54 +00:00
Dimitry Andric 4abd7edcbd Split the last gcc-specific flags off into CFLAGS.gcc. This also
removes the need to use -Qunused-arguments for clang throughout the
tree.

MFC after:	3 days
2014-01-05 21:03:49 +00:00
Sean Bruno 4a40e59f97 svn r251516 resized the buf argument a bit too much. Pass a hardcoded
size of 6 to humanize_number() to resolve this.

PR:		184405
Submitted by:	jhb
MFC after:	2 weeks
2013-12-04 00:28:44 +00:00
Sean Bruno 43a3230ade Noted that the stripe_size argument was not being displayed in the usage
message

MFC after:	2 weeks
2013-11-12 17:10:56 +00:00
Joel Dahl 13121e810d mdoc: remove superfluous paragraph macro. 2013-11-08 23:08:01 +00:00
Sean Bruno ee7a2acac5 Add support for controlling mfi(4) controller properties:
allow user control of rebuild rate
allow user control of silence/enable alarm

MFC after:	2 weeks
Sponsored by:	Yahoo! Inc.
2013-11-07 21:47:59 +00:00
Simon J. Gerraty d1d0158641 Merge from head 2013-09-05 20:18:59 +00:00
Sean Bruno 7c2ad1ee5c Add support to reconfigure a drive as SYSPD (real JBOD in LSI
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.
2013-08-26 12:05:38 +00:00
Sean Bruno 06f1884fa8 Implement foreign volume handling. Allows admins to view foreign metadata
and clear or import it for use.

PR:     kern/172091
Submitted by:   smh@freebsd.org
Reviewed by:    jhb@freebsd.org
MFC after:      2 weeks
2013-06-08 02:54:59 +00:00
Mark Johnston 252d859338 Add a remark to the effect that a manually started relearn will always
result in the battery being completely drained, even in transparent learning
mode.

MFC in:		3 days
Sponsored by:	Sandvine Inc.
2013-05-13 15:00:36 +00:00
Simon J. Gerraty 69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Mark Johnston 8f66059200 Switch to a 2-clause license.
Approved by:	emaste (co-mentor)
X-MFC with:	r249257
2013-04-08 18:25:07 +00:00
Mark Johnston dee3e845aa Add support for getting and setting BBU properties related to battery
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
2013-04-08 17:46:45 +00:00
Simon J. Gerraty 7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty 23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten 186475e2dd Remove redundant code.
Both mfi_flash.c and mfi_show.c contain very similar functions to print
a list of firmwares. Move these routines into mfiutil.c.

Reported by:	jhb
2012-10-20 10:20:06 +00:00
Ed Schouten bf70becee6 More -Wmissing-variable-declarations fixes.
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'.
2012-10-19 14:49:42 +00:00
Marcel Moolenaar 7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Matt Jacob 0896d52530 Fix ARM compilation issue.
X-MFC: 237260
2012-06-20 17:20:25 +00:00
Eitan Adler 41b8cbda7d 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
2012-06-19 06:18:42 +00:00
Eitan Adler bf4ec4dfab 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
2012-06-19 06:18:37 +00:00
Sean Bruno f8b329b0bf Decode new battery status indications.
Requires r235634

Reviewed by:	ambrisko@
MFC after:	3 days
2012-05-18 21:50:26 +00:00
Doug Ambrisko b53011f9cf MFhead_mfi r233621
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.
2012-03-30 23:39:39 +00:00