Vendor import of smart at 1.0.2 #19

Open
chuck wants to merge 1 commit from chuck/smart/initial into main AGit
Member
No description provided.
Vendor import of smart at 1.0.2
Some checks failed
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (pull_request) Blocked by required conditions
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (pull_request) Blocked by required conditions
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (pull_request) Blocked by required conditions
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (pull_request) Blocked by required conditions
Cross-build Kernel / amd64 macos-latest (clang-18) (pull_request) Blocked by required conditions
Cross-build Kernel / aarch64 macos-latest (clang-18) (pull_request) Blocked by required conditions
Style Checker / Style Checker (pull_request) Blocked by required conditions
Checklist / commit (pull_request_target) Has been cancelled
f1a6a65598
chuck requested review from fuz 2026-04-22 14:06:43 +00:00
ziaee left a comment

Hey Chuck, thank you so much for doing this! Many people have been asking for something like this for a very long time, and I've been talking about it everyday with people this week actually. If we can get this in in the next 5 days, I think we can ship it in 15.1.

Hey Chuck, thank you so much for doing this! Many people have been asking for something like this for a very long time, and I've been talking about it everyday with people this week actually. If we can get this in in the next 5 days, I think we can ship it in 15.1.
@ -0,0 +1,253 @@
.\"
.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
Member

remove -FreeBSD, SPDX removed it https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html

remove `-FreeBSD`, SPDX removed it https://spdx.org/licenses/BSD-2-Clause-FreeBSD.html
chuck marked this conversation as resolved
@ -0,0 +32,4 @@
.Sh NAME
.Nm smart ,
.Nm diskhealth
.Nd "retrieve health / SMART data from a device"
Member

I think we could really use the storage search keyword here. What do you think of the following:

.Nd monitor disk health from a storage device via SMART

I think we could really use the storage search keyword here. What do you think of the following: `.Nd monitor disk health from a storage device via SMART`
Author
Member

Works for me

Works for me
chuck marked this conversation as resolved
@ -0,0 +138,4 @@
ignore the
.Fl Fl threshold
option.
Member

please do not use empty lines in roff, it causes a linter complaint

please do not use empty lines in roff, it causes a linter complaint
Member

If you wish to put in a paragraph break, use .Pp. If you want just a blank line for grouping, use the empty request ..

If you wish to put in a paragraph break, use `.Pp`. If you want just a blank line for grouping, use the empty request `.`.
chuck marked this conversation as resolved
@ -0,0 +169,4 @@
) or GEOM provider (
.Bl -tag -width "ada0" -compact
.Pa ada0
).
Member

what's going on here?

what's going on here?
Author
Member

Pure n00b stuff :)
Think what I want is:

.Pa /dev/ada0
) or GEOM provider (
.Pa ada0
).
Pure n00b stuff :) Think what I want is: ``` .Pa /dev/ada0 ) or GEOM provider ( .Pa ada0 ). ```
Member

Even better would be this:

Or GEOM provider
.Pq Pa ada0
Even better would be this: ``` Or GEOM provider .Pq Pa ada0 ```
chuck marked this conversation as resolved
@ -0,0 +175,4 @@
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
.Pp
Member

please remove this paragraph break, there will be no change to the rendered output.

please remove this paragraph break, there will be no change to the rendered output.
chuck marked this conversation as resolved
@ -0,0 +182,4 @@
threshold values for ATA drive ada0.
.Ed
.Pp
.Dl "# smart -a 5 ada0
Member

Please remove quotes, Dl takes the entire rest of the line. Quotes in roff do not work the way people expect, so I try to discourage overquoting because it will cause confusion when people or machines are studying the code.

Please remove quotes, Dl takes the entire rest of the line. Quotes in roff do not work the way people expect, so I try to discourage overquoting because it will cause confusion when people or machines are studying the code.
chuck marked this conversation as resolved
@ -0,0 +183,4 @@
.Ed
.Pp
.Dl "# smart -a 5 ada0
.Bd -offset indent -compact
Member

please remove these display blocks. we dont normally use them, and there will be no change to how the page is currently rendering.

please remove these display blocks. we dont normally use them, and there will be no change to how the page is currently rendering.
Author
Member

I am seeing a difference in rendering. With the display block:

EXAMPLES
           # smart -t ada0
           Print all SMART READ DATA and SMART STATUS including the threshold
           values for ATA drive ada0.

without

EXAMPLES
           # smart -t ada0
     Print all SMART READ DATA and SMART STATUS including the threshold values
     for ATA drive ada0.

Looking at jexec.8, it places the description before the command which might make more sense here. Something like:

.Sh EXAMPLES
Print all SMART READ DATA and SMART STATUS including the
threshold values for ATA drive ada0.
.Pp
.Dl # smart -t ada0
.Ed

Thoughts?

I am seeing a difference in rendering. With the display block: ``` EXAMPLES # smart -t ada0 Print all SMART READ DATA and SMART STATUS including the threshold values for ATA drive ada0. ``` without ``` EXAMPLES # smart -t ada0 Print all SMART READ DATA and SMART STATUS including the threshold values for ATA drive ada0. ``` Looking at `jexec.8`, it places the description before the command which might make more sense here. Something like: ``` .Sh EXAMPLES Print all SMART READ DATA and SMART STATUS including the threshold values for ATA drive ada0. .Pp .Dl # smart -t ada0 .Ed ``` Thoughts?
Member

Oh, that's why I didn't understand. Description always comes before the command. Please let me know if you discover any pages where it's backwards, I will fix them. Your example is correct, except you don't want that .Ed at the end. .Ed is the close of a .Bd. Dl is self contained, but needs to be padded with .Pps if you want line breaks, and that is the cleanest way to write it if you want to use standard indentation.

Oh, that's why I didn't understand. Description always comes before the command. Please let me know if you discover any pages where it's backwards, I will fix them. Your example is correct, except you don't want that .Ed at the end. .Ed is the close of a .Bd. Dl is self contained, but needs to be padded with .Pps if you want line breaks, and that is the cleanest way to write it if you want to use standard indentation.
chuck marked this conversation as resolved
@ -0,0 +213,4 @@
.It
Start-stop Cycles
.It
Informational Exceptions
Member

extra white space at end of line here. Also, for @bapt, we need forgejo to show this, I think

extra white space at end of line here. Also, for @bapt, we need forgejo to show this, I think
chuck marked this conversation as resolved
@ -0,0 +247,4 @@
.Xr nvd 4
.Sh AUTHORS
This
manual page was written by
Member

The
.Nm
utility was written by

because you wrote everything, right, not just the manual?

The .Nm utility was written by because you wrote everything, right, not just the manual?
chuck marked this conversation as resolved
fuz left a comment

LGTM, though I don't know enough about vendor imports to say for sure.
Please check if you can remove the unnecessary files and think about what to do with the *smart scripts.

LGTM, though I don't know enough about vendor imports to say for sure. Please check if you can remove the unnecessary files and think about what to do with the *smart scripts.
@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
Member

Can we omit this file? It is useless.

Can we omit this file? It is useless.
chuck marked this conversation as resolved
@ -0,0 +1,2 @@
1. Please follow [style(9)](http://www.freebsd.org/cgi/man.cgi?query=style&sektion=9)
Member

Can we omit this file? It is useless.

Can we omit this file? It is useless.
chuck marked this conversation as resolved
@ -0,0 +1,91 @@
#!/bin/sh
Member

Is this script useful? If yes, we should install it. If not, we should remove it from the distribution.

Is this script useful? If yes, we should install it. If not, we should remove it from the distribution.
Author
Member

These scripts are less useful than they were at the beginning. Removing them is a good call.

These scripts are less useful than they were at the beginning. Removing them is a good call.
chuck marked this conversation as resolved
@ -0,0 +1,41 @@
#!/bin/sh
Member

Is this script useful? If yes, we should install it. If not, we should remove it from the distribution.

Is this script useful? If yes, we should install it. If not, we should remove it from the distribution.
chuck marked this conversation as resolved
@ -0,0 +1,38 @@
#!/bin/sh
Member

Is this script useful? If yes, we should install it. If not, we should remove it from the distribution.

Is this script useful? If yes, we should install it. If not, we should remove it from the distribution.
chuck marked this conversation as resolved
Some checks failed
Cross-build Kernel / amd64 ubuntu-22.04 (clang-15) (pull_request) Blocked by required conditions
Cross-build Kernel / aarch64 ubuntu-22.04 (clang-15) (pull_request) Blocked by required conditions
Cross-build Kernel / amd64 ubuntu-24.04 (clang-18) (pull_request) Blocked by required conditions
Cross-build Kernel / aarch64 ubuntu-24.04 (clang-18) (pull_request) Blocked by required conditions
Cross-build Kernel / amd64 macos-latest (clang-18) (pull_request) Blocked by required conditions
Cross-build Kernel / aarch64 macos-latest (clang-18) (pull_request) Blocked by required conditions
Style Checker / Style Checker (pull_request) Blocked by required conditions
Checklist / commit (pull_request_target) Has been cancelled
This pull request has changes conflicting with the target branch.
  • contrib/smart/Changelog
  • contrib/smart/LICENSE
  • contrib/smart/Makefile
  • contrib/smart/freebsd_dev.c
  • contrib/smart/libsmart.c
  • contrib/smart/libsmart_dev.h
  • contrib/smart/smart.8
  • contrib/smart/smart.c
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin +refs/pull/19/head:chuck/smart/initial
git switch chuck/smart/initial
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
FreeBSD/src!19
No description provided.