参考所有分组,完成尽量多的内容。禁止顺手扩功能 smoke

结论:对齐 LinuxCNC tooldata_nml.cc 与 tooldata_db.cc 的失败诊断输出,收紧 WASM tooldata link probe;未扩展临时 smoke 行为。
This commit is contained in:
cnc
2026-06-03 21:19:24 +08:00
parent feb04102e7
commit 945e839e9d
2 changed files with 14 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
#include "tooldata.hh"
#include <cstdio>
#include <cstring>
#include <unistd.h>
@@ -15,7 +16,11 @@ bool db_live = false;
extern "C" {
int tool_nml_register(CANON_TOOL_TABLE *tblptr) {
return tblptr ? 0 : -1;
if (!tblptr) {
std::fprintf(stderr, "%5d!!!PROBLEM tool_nml_register()\n", getpid());
return -1;
}
return 0;
}
int tooldata_db_init(char progname_plus_args[], int) {
@@ -29,10 +34,14 @@ int tooldata_db_init(char progname_plus_args[], int) {
for (char *token = program; token; token = strtok_r(nullptr, " ", &saveptr)) {
++argc;
if (argc >= MAX_DB_PROGRAM_ARGS) {
std::fprintf(stderr,
"!!!!db_init: argc exceeds MAX_DB_PROGRAM_ARGS=%d\n",
MAX_DB_PROGRAM_ARGS);
return -1;
}
}
if (!program || access(program, X_OK) != 0) {
std::fprintf(stderr, "!!!!db_init: <%s> not executable\n", program ? program : "");
return -1;
}
return -1;