1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-27 11:55:06 +00:00
freebsd/usr.sbin/trim
Eugene Grosbein fa707ac77f trim(8): emit more user-friendly error message in verbose mode.
If underlying driver provides no TRIM/UNMAP support and operation fails
due to this reason, state it clearly in verbose mode (default)
instead of writing standard message that may be too cryptic for a user:

	trim: ioctl(DIOCGDELETE) failed: nda0: Operation not supported

Now it would write:

	trim: nda0: TRIM/UNMAP not supported by driver

But still use previous format including errno value for quiet mode.

Small candelete() function borrowed from diskinfo(8) code.
This function was committed by Alan Somers <asomers@FreeBSD.org>,
so give him some credit.

Reported by:	chuck
2019-03-15 14:42:23 +00:00
..
Makefile Re-add new small tool trim(8) to delete contents for blocks 2019-01-17 18:07:59 +00:00
trim.8 Re-add new small tool trim(8) to delete contents for blocks 2019-01-17 18:07:59 +00:00
trim.c trim(8): emit more user-friendly error message in verbose mode. 2019-03-15 14:42:23 +00:00