Page MenuHomeFreeBSD

Introduce a new sesutil(8) tool
ClosedPublic

Authored by bapt on Sep 1 2015, 2:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 12 2024, 1:23 AM
Unknown Object (File)
Mar 12 2024, 1:23 AM
Unknown Object (File)
Mar 12 2024, 1:23 AM
Unknown Object (File)
Mar 12 2024, 1:23 AM
Unknown Object (File)
Mar 12 2024, 1:23 AM
Unknown Object (File)
Mar 8 2024, 4:17 AM
Unknown Object (File)
Jan 4 2024, 5:29 AM
Unknown Object (File)
Jan 4 2024, 4:23 AM

Details

Reviewers
mav
Group Reviewers
manpages
Commits
rS287473: Add a new sesutil(8) utility
Summary

For now it only supports making disks blinking:

Usage:
sesutil locate disk [on|off]

a special argument 'all' can be used for disks.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt retitled this revision from to Introduce a new sesutil(8) tool.
bapt updated this object.
bapt edited the test plan for this revision. (Show Details)
bapt added a reviewer: mav.
bapt added a subscriber: allanjude.
bapt added a subscriber: araujo.
wblock added inline comments.
usr.sbin/sesutil/sesutil.8
44 ↗(On Diff #8392)

"locate" implies that the command searches for a drive. Maybe "indicator" or "identify" or something? Or even just "LED" or "led"?

45 ↗(On Diff #8392)

s/Cange/Change/

48 ↗(On Diff #8392)
The device name of the disk, like
.Cm da12 ,
or
.Cm all
to indicate all disks.

But that last part is wrong, I think. Is it all disks attached to SES controllers? All disks that support SES commands?

54 ↗(On Diff #8392)

s/LED/LEDs/

58 ↗(On Diff #8392)
Turn on the external LED of drive
.Pa da15 :
66 ↗(On Diff #8392)

s/appearred/appeared/

Update manpage according to @wblock comments

bapt marked 5 inline comments as done.Sep 1 2015, 3:42 PM
bapt added inline comments.
usr.sbin/sesutil/sesutil.8
44 ↗(On Diff #8392)

locate is the usual command for this, the goal is to locate the disk :), mfiutil for example uses the same name. the other name commonly used is "ident"

usr.sbin/sesutil/sesutil.8
48 ↗(On Diff #8395)

The "should be either" is not needed.

51 ↗(On Diff #8395)

No period, just

.Cm all
44 ↗(On Diff #8392)

Okay. Maybe add "ident" as an alias?

usr.sbin/sesutil/sesutil.c
58 ↗(On Diff #8395)

Could we change from 'unsigned int' to 'int' and avoid the -Werror,-Wsign-compare?

82 ↗(On Diff #8395)

The variable *obj seems to be not used here. Could we remove it and avoid -Wunused-variable?

84 ↗(On Diff #8395)

The same for 'o'.

161 ↗(On Diff #8395)

Here is just for style than anything else, as you are initializing the variable i inside the loop, it could be 'int i;' like in some other functions. But it really doesn't matter, only for code consistency.

  1. I think device name comparison won't work right, giving either false positives or negatives..
  2. If some enclosure was disconnected, ses device names may not be consequential. In such case your code won't find ones after the hole.
  3. I don't remember specific bits, but I have feeling that just writing zero to element control may cause unwanted effects.
bapt edited edge metadata.

Address @mav comments

mav edited edge metadata.

I have no objections.

This revision is now accepted and ready to land.Sep 4 2015, 8:02 PM
This revision was automatically updated to reflect the committed changes.