[smartmontools-support] macOS NVMe support is documented!
Harry Mallon
hjmallon at gmail.com
Tue Jun 23 15:12:38 CEST 2020
Hi Christian,
I attach a new simplified patch.
Harry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-os_darmin-Update-NVMeSMARTLib-information-based-on-n.patch
Type: application/octet-stream
Size: 3114 bytes
Desc: not available
URL: <https://listi.jpberlin.de/pipermail/smartmontools-support/attachments/20200623/5e4dcd83/attachment.obj>
-------------- next part --------------
> On 16 Jun 2020, at 18:57, Christian Franke <Christian.Franke at t-online.de> wrote:
>
> Hi Harry,
>
> Harry Mallon wrote:
>> I attach two patches. To be honest I wasn't quite sure what to do with the 'old' code. There is an argument for just putting the whole header into the smartmontools tree (like linux_nvme_ioctl.h does).
>
> If the include file is APSL licensed, then possibly not. FSF declares APSL as incompatible with GPL (https://www.gnu.org/philosophy/apsl.en.html). In the past, we got some complaints about subtle licensing problems in the source tarball (e.g. https://www.smartmontools.org/ticket/1226 for linux_nvme_ioctl.h).
>
>
>> For now I have done small updates to the existing code and ifdeffed to allow building against the new header. It builds in both configurations for me and I can see some info from my SSD, but I wouldn't consider it fully tested.
>
> Thanks. But is this complexity worth the effort?
>
> The patch adds the new functionality unconditionally. AFAICS the patch could be reduced to:
>
> err = smartIfNVMe->SMARTReadData(ifp, (struct nvme_smart_log *) in.buffer);
> - else /* GetLogPage() is not working yet */
> - return set_err(ENOSYS, "NVMe admin command:0x%02x/page:0x%02x is not supported",
> - in.opcode, page);
> + else
> + err = smartIfNVMe->GetLogPage(ifp, in.buffer, page, in.size / 4);
> break;
>
> ... plus possibly the man page change and the clarification of GetLogPage() arguments in os_darwin.h.
>
> This should add GetLogPage() support without need of the new include file. We could later move to the new include file when backward compatibility is no longer needed.
>
> Thanks,
> Christian
>
More information about the Smartmontools-support
mailing list