验证 tooldata NML 非空表注册路径
This commit is contained in:
@@ -224,6 +224,12 @@ int main() {
|
|||||||
}
|
}
|
||||||
alignas(EMC_TOOL_STAT) unsigned char toolstat_storage[sizeof(EMC_TOOL_STAT)] = {};
|
alignas(EMC_TOOL_STAT) unsigned char toolstat_storage[sizeof(EMC_TOOL_STAT)] = {};
|
||||||
auto *toolstat = reinterpret_cast<EMC_TOOL_STAT *>(toolstat_storage);
|
auto *toolstat = reinterpret_cast<EMC_TOOL_STAT *>(toolstat_storage);
|
||||||
|
// LinuxCNC src/emc/tooldata/tooldata_nml.cc accepts a non-null table
|
||||||
|
// pointer before NML-backed tooldata operations can use it.
|
||||||
|
CANON_TOOL_TABLE nml_tool_table[CANON_POCKETS_MAX] = {};
|
||||||
|
if (tool_nml_register(nml_tool_table) != 0) {
|
||||||
|
return 77;
|
||||||
|
}
|
||||||
if (tool_mmap_creator(toolstat, 1) != 0) {
|
if (tool_mmap_creator(toolstat, 1) != 0) {
|
||||||
return 15;
|
return 15;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user