From decc008609db05af446cd80d9d089e34bcae5026 Mon Sep 17 00:00:00 2001 From: cnc Date: Thu, 4 Jun 2026 05:48:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=8C=E5=AE=8C=E6=88=90=E5=B0=BD=E9=87=8F=E5=A4=9A?= =?UTF-8?q?=E7=9A=84=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 结论:聚合守护锁住LinuxCNC loadusr源依据,要求switchkins/remap生成器按do_loadusr_cmd getopt(+wWin:)和补全表跳过等待名后再记录实际程序。 --- docs/linuxcnc-source-policy.md | 7 +++++++ test-all-native.sh | 10 ++++++++++ 2 files changed, 17 insertions(+) diff --git a/docs/linuxcnc-source-policy.md b/docs/linuxcnc-source-policy.md index f7eadd8..e58bc15 100644 --- a/docs/linuxcnc-source-policy.md +++ b/docs/linuxcnc-source-policy.md @@ -124,6 +124,13 @@ Efficiency rules: entries as source coverage only. Resolvable tool tables referenced by M428/M429/M430 INI files must be present as `tooldata` manifest entries and must not become new generated API aliases or browser cases. +- LinuxCNC `halcmd loadusr` parsing must stay source-tied to + `src/hal/utils/halcmd_commands.cc` `do_loadusr_cmd()` and its + `getopt("+wWin:")` option model. Generator/checker code that extracts + user-space component programs from INI/HAL `loadusr` lines must also preserve + the common `-W/-Wn/-w/-iw` forms listed by + `src/hal/utils/halcmd_completion.c`, and must skip wait component names such + as `-Wn NAME` or `-n NAME` before recording the actual program source. - The kinematics manifest lister must preserve every allowed manifest group used by switchkins and RTCP coverage, including `asset`, `tooldata`, and `generated`, and must reject unknown filters or output modes for those groups. diff --git a/test-all-native.sh b/test-all-native.sh index 78cc8ae..8aae54f 100755 --- a/test-all-native.sh +++ b/test-all-native.sh @@ -149,6 +149,12 @@ grep -F 'missing LinuxCNC switchkins remap source in manifest:' check-linuxcnc-s grep -F 'LinuxCNC source basis: cached switchkins/remap validation hashes the LinuxCNC' check-linuxcnc-switchkins-remap-table-cached.sh >/dev/null grep -F 'LinuxCNC source basis: generated switchkins/remap tables are extracted from' generate-linuxcnc-switchkins-remap-table.sh >/dev/null grep -F 'LINUXCNC_ROOT="$linuxcnc_root" ./check-linuxcnc-inputs-cached.sh "$manifest"' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'src/hal/utils/halcmd_commands.cc do_loadusr_cmd()' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'getopt("+wWin:")' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'src/hal/utils/halcmd_completion.c lists the common -W/-Wn/-w/-iw forms' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'function loadusr_program(value, fields, field_count, i, token)' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'if (token == "-Wn" || token == "-n")' generate-linuxcnc-switchkins-remap-table.sh >/dev/null +grep -F 'i++' generate-linuxcnc-switchkins-remap-table.sh >/dev/null grep -F 'LinuxCNC source basis: Puma560 DH parameter output is generated from' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null test -x generate-linuxcnc-puma560-dh-parameters.sh grep -F 'usage: $0 [linuxcnc-root-relative-puma560-dh-hal]' generate-linuxcnc-puma560-dh-parameters.sh >/dev/null @@ -190,6 +196,10 @@ grep -F 'the cached wrapper script, checker script, generator script' docs/linux grep -F 'generated table/case outputs, and the thin API/web bridge files that pass' docs/linuxcnc-source-policy.md >/dev/null grep -F 'switchkins config aliases.' docs/linuxcnc-source-policy.md >/dev/null grep -F 'The switchkins/remap generator must treat LinuxCNC `[EMCIO] TOOL_TABLE`' docs/linuxcnc-source-policy.md >/dev/null +grep -F 'LinuxCNC `halcmd loadusr` parsing must stay source-tied to' docs/linuxcnc-source-policy.md >/dev/null +grep -F '`src/hal/utils/halcmd_commands.cc` `do_loadusr_cmd()`' docs/linuxcnc-source-policy.md >/dev/null +grep -F '`getopt("+wWin:")` option model' docs/linuxcnc-source-policy.md >/dev/null +grep -F '`src/hal/utils/halcmd_completion.c`' docs/linuxcnc-source-policy.md >/dev/null grep -F 'must not become new generated API aliases or browser cases.' docs/linuxcnc-source-policy.md >/dev/null grep -F 'The kinematics manifest lister must preserve every allowed manifest group' docs/linuxcnc-source-policy.md >/dev/null grep -F 'including `asset`, `tooldata`, and' docs/linuxcnc-source-policy.md >/dev/null