参考所有分组,完成尽量多的内容。禁止顺手扩功能 smoke:锁定tooldata未激活DB语义
结论:按 LinuxCNC src/emc/tooldata/tooldata_db.cc 锁定 tooldata_db_getall() 未激活返回 -1、tooldata_db_notify() 未激活返回 0 的 WASM shim 探针与 source-map 守卫;不启用外部 DB 服务,不扩展 smoke 解析。
This commit is contained in:
@@ -113,6 +113,18 @@ int main() {
|
||||
if (tooldata_db_getall() != -1) {
|
||||
return 28;
|
||||
}
|
||||
// LinuxCNC source basis: src/emc/tooldata/tooldata_db.cc
|
||||
// tooldata_db_notify() returns 0 without side effects while db_live is
|
||||
// false, which is the browser-safe shim state for external DB services.
|
||||
if (tooldata_db_notify(SPINDLE_LOAD, 7, 12, uncreated_tool) != 0) {
|
||||
return 57;
|
||||
}
|
||||
if (tooldata_db_notify(SPINDLE_UNLOAD, 7, 12, uncreated_tool) != 0) {
|
||||
return 58;
|
||||
}
|
||||
if (tooldata_db_notify(TOOL_OFFSET, 7, 12, uncreated_tool) != 0) {
|
||||
return 59;
|
||||
}
|
||||
std::string missing_db_program_with_arg_string =
|
||||
make_temp_path("cnc_tooldata_probe_missing_db_program arg");
|
||||
std::vector<char> missing_db_program_with_arg(
|
||||
|
||||
@@ -48,6 +48,8 @@ int tooldata_db_init(char progname_plus_args[], int) {
|
||||
}
|
||||
|
||||
int tooldata_db_notify(tool_notify_t, int, int, CANON_TOOL_TABLE) {
|
||||
// LinuxCNC source basis: src/emc/tooldata/tooldata_db.cc returns 0 when
|
||||
// db_live is false, before formatting or sending any DB notification.
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user