]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r326769:
authorbapt <bapt@FreeBSD.org>
Sun, 7 Jan 2018 10:29:15 +0000 (10:29 +0000)
committerbapt <bapt@FreeBSD.org>
Sun, 7 Jan 2018 10:29:15 +0000 (10:29 +0000)
commit70f47ab42c3654ed2e73a9ae46d8b47f7723b938
treeda935deab5151ae325e7ba73cf0f49f03d3f8174
parentf0b3f761c7280baa1c9e2fa7e3e76088a3eada51
MFC r326769:

Remove hard coded number of lun definition

The number of lun exposed is now exposed via sysctl by the kernel.
Use that number in ctlstat instead of the hardcoded version
Add a backward compatibility in case the sysctl(2) request fails.

This also allows ctlstat -l 1118 to actually work when having more than
1024 luns.

Reviewed by: avg, manu (both before the backward compatibility addition)
Approved by: avg, manu (both before the backward compatibility addition)
Sponsored by: Gandi.net
Differential Revision: https://reviews.freebsd.org/D13446
usr.bin/ctlstat/ctlstat.c