[smartmontools-support] macOS NVMe support is documented!

Christian Franke Christian.Franke at t-online.de
Tue Jun 23 18:47:36 CEST 2020


Hi Harry,

applied in r5068.

Thanks,
Christian

Harry Mallon wrote:
> Hi Christian,
>
> I attach a new simplified patch.
>
> Harry
>
>
>
>> 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