docs: audit namespace lock and salvage stubs

This commit is contained in:
A
2026-06-02 15:07:08 +00:00
committed by Mario Fetka
parent 6fd81cf590
commit b6c709b5c8
3 changed files with 152 additions and 31 deletions

65
AI.md
View File

@@ -11,18 +11,18 @@ When the user says this is a new chat or asks to continue mars-nwe work, first
read this file before proposing patches or making assumptions. Then ask for, or
use, the current project status that the user pasted into the chat.
## Current handoff status after patch 0211
## Current handoff status after patch 0212
The current accepted patch line in this chat is expected to include:
- endpoint-audit/documentation patches through `0176-docs-audit-direct-lifecycle-buffer-endpoints.patch`;
- redesign documentation patches `0177` through `0198`;
- endpoint-audit/documentation patches `0199` through `0211`;
- latest expected patch name: `0211-docs-audit-namespace-open-callback-stubs.patch`.
- endpoint-audit/documentation patches `0199` through `0212`;
- latest expected patch name: `0212-docs-audit-namespace-lock-salvage-stubs.patch`.
When continuing in a new chat, first ask the user which patch was actually last
applied. If they confirm `0211`, build the next patch as `0212-...` against a
tree that already contains `0211`. If any patch failed or was skipped, rebuild
applied. If they confirm `0212`, build the next patch as `0213-...` against a
tree that already contains `0212`. If any patch failed or was skipped, rebuild
against the last confirmed applied patch instead of assuming the file in
`/mnt/data` was accepted.
@@ -198,15 +198,14 @@ Schema/import direction:
Latest endpoint audit note:
- Patch `0211` audits the next `NCP 0x2222/87` / wire `0x57` Name Space
open/create callback and metadata subset from `87/30` through `87/35`. The
current source has no active handlers for these selectors, so they are
represented as disabled `#if 0` stubs at the correct switch locations. The
stubs document request/reply/provider intent and do not change runtime
behavior. Next patch should be `0212`; a likely next block is the remaining
`87` namespace/file range such as `87/36`..`87/44` or `87/64`..`87/69`, or
the parallel `89` long namespace family unless the user chooses another
family.
- Patch `0212` audits the next `NCP 0x2222/87` / wire `0x57` Name Space
lock/quota/search/salvage-rights subset from `87/36` through `87/43`. The
active source has no handlers for these selectors, so they are represented as
disabled `#if 0` stubs at the correct switch locations. `87/44` Update File
Handle Rights is documented as NetWare 5.x and is intentionally not added as
a source stub under the current 1.x/2.x/3.x plus planned-4.x scope. Next
patch should be `0213`; a likely next block is `87/64`..`87/69`, the parallel
`89` long namespace family, or another user-selected endpoint family.
## Patch workflow
@@ -449,9 +448,9 @@ user.org.mars-nwe.afp.prodos-info=0x010203040506
## Latest endpoint audit checkpoint
As of patch `0211-docs-audit-namespace-open-callback-stubs.patch`,
the latest audited endpoint block is the Name Space open/create callback and
metadata subset of `NCP 0x2222/87` / wire `0x57` in `src/namspace.c`.
As of patch `0212-docs-audit-namespace-lock-salvage-stubs.patch`,
the latest audited endpoint block is the Name Space lock/quota/search/salvage-rights
subset of `NCP 0x2222/87` / wire `0x57` in `src/namspace.c`.
`nwconn.c` still forwards requestdata starting at the Name Space `SubFunction`
byte to `handle_func_0x57()`, and the handler return convention remains
unchanged: non-negative values are reply payload lengths, negative values are
@@ -477,28 +476,32 @@ Disabled source stubs exist for eligible 3.x/4.x metadata gaps from that range:
- `87/25` Set NS Information;
- `87/27` Get Name Space Directory Entry.
Patch `0211` added the next set of disabled source stubs for eligible
3.x/4.x namespace gaps that were missing from the active switch range:
Patch `0212` added the next set of disabled source stubs for eligible
1.x/2.x/3.x and planned-4.x namespace/file gaps that were missing from the
active switch range:
- `87/30` Open/Create File or Subdirectory with DataStream;
- `87/31` Get File Information;
- `87/32` Open/Create File or Subdirectory with Callback;
- `87/33` Open/Create File or Subdirectory II with Callback;
- `87/34` Open CallBack Control;
- `87/35` Modify DOS Attributes on a File or Subdirectory.
- `87/36` Log File;
- `87/37` Release File;
- `87/38` Clear File;
- `87/39` Get Directory Disk Space Restriction;
- `87/40` Search for File or Subdirectory Set (Extended Errors);
- `87/41` Scan Salvageable File List;
- `87/42` Purge Salvageable File List;
- `87/43` Revoke File Handle Rights.
These stubs are under `#if 0`, document selector path/request/reply/provider
intent, and do not change runtime behavior. The existing `87/26` source slot is
still effectively unimplemented and returns the default `0xfb` completion.
intent, and do not change runtime behavior. `87/44` Update File Handle Rights
is NetWare 5.x in the NDK material and was not stubbed under the current scope.
The existing `87/26` source slot is still effectively unimplemented and returns
the default `0xfb` completion.
The next endpoint block can continue with the remaining `87` namespace/file
subfunction ranges such as `87/36`..`87/44` or `87/64`..`87/69`, the matching
`89` long-name-space family, or another unaudited top-level family such as AFP
The next endpoint block can continue with `87/64`..`87/69`, the matching `89`
long-name-space family, or another unaudited top-level family such as AFP
`0x2222/35`, packet burst `0x2222/97`/`101`, or deeper `0x2222/23`
bindery/property/admin subfunction coverage, unless the user requests a
specific family first.
The next patch number should be `0212` if `0211` was applied.
The next patch number should be `0213` if `0212` was applied.
Retro source-stub checkpoint from patch 0207:

24
TODO.md
View File

@@ -1118,6 +1118,30 @@ Follow-up:
notes.
### Name Space group 0x2222/87 lock/quota/search/salvage-rights subset
Current status:
- `NCP 0x2222/87` / wire `0x57` is source-stub-audited for the next
documented namespace/file subfunctions `87/36` through `87/43`.
- The active source had no handlers for this range, so disabled `#if 0` stubs
were added at the correct selector locations for:
`87/36` Log File, `87/37` Release File, `87/38` Clear File, `87/39` Get
Directory Disk Space Restriction, `87/40` Search for File or Subdirectory Set
(Extended Errors), `87/41` Scan Salvageable File List, `87/42` Purge
Salvageable File List, and `87/43` Revoke File Handle Rights.
- `87/44` Update File Handle Rights is documented as NetWare 5.x in the NDK
material, so it is intentionally not added as a source stub under the current
1.x/2.x/3.x plus planned-4.x scope.
- These stubs are documentation-only and leave runtime behavior unchanged.
Follow-up:
- Continue the namespace audit with `87/64`..`87/69`, the matching `89`
long-name-space family, or another unaudited endpoint family requested by the
user.
### Retrospective source-stub coverage for already audited blocks
Current status:

View File

@@ -3849,6 +3849,100 @@ static int code = 0;
*/
result = -0xfb;
break;
case 0x24 : /* SDK 87/36 Log File.
* Coverage: documented 2.x/3.x/4.x file-locking call, but
* no active source case exists yet.
* Request: SubFunction, NameSpace, LockFlag, LockTimeout,
* reserved bytes, then NWHandlePathStruct.
* Reply: no payload, normal Completion status.
* Future owner: filesystem/namespace lock provider.
*/
result = -0xfb;
break;
case 0x25 : /* SDK 87/37 Release File.
* Coverage: documented 2.x/3.x/4.x file-locking call, but
* no active source case exists yet.
* Request: SubFunction, NameSpace, reserved bytes, then
* NWHandlePathStruct.
* Reply: no payload, normal Completion status.
* Future owner: filesystem/namespace lock provider.
*/
result = -0xfb;
break;
case 0x26 : /* SDK 87/38 Clear File.
* Coverage: documented 2.x/3.x/4.x file-locking call, but
* no active source case exists yet.
* Request: SubFunction, NameSpace, reserved bytes, then
* NWHandlePathStruct.
* Reply: no payload, normal Completion status.
* Future owner: filesystem/namespace lock provider.
*/
result = -0xfb;
break;
case 0x27 : /* SDK 87/39 Get Directory Disk Space Restriction.
* Coverage: documented 3.x/4.x directory quota call, but no
* active source case exists yet.
* Request: SubFunction, NameSpace, reserved bytes, then
* NWHandlePathStruct naming the target subdirectory.
* Reply: NumberOfEntries followed by DirDiskSpaceRestList
* entries back toward the root.
* Future owner: filesystem/namespace quota provider.
*/
result = -0xfb;
break;
case 0x28 : /* SDK 87/40 Search for File or Subdirectory Set
* (Extended Errors).
* Coverage: documented 3.x/4.x namespace search variant,
* but no active source case exists yet.
* Request: like 87/20, but clients may set the high
* SearchAttributes bit to request extended error codes.
* Reply: NextSearchSequence, MoreEntriesFlag, InfoCount,
* then NetWareInfoStruct/optional NetWareFileNameStruct
* entries.
* Future owner: filesystem/namespace provider.
*/
result = -0xfb;
break;
case 0x29 : /* SDK 87/41 Scan Salvageable File List.
* Coverage: documented 4.x salvage-list call, but no active
* source case exists yet.
* Request: SubFunction, NameSpace, reserved, ControlFlags,
* ScanSequence, then NWHandlePathStruct for a directory.
* Reply: NextScanSequence, PurgeBase, ScanItems, then
* ScanInfo structures with or without names.
* Future owner: filesystem/namespace salvage provider.
*/
result = -0xfb;
break;
case 0x2a : /* SDK 87/42 Purge Salvageable File List.
* Coverage: documented 4.x salvage-list call, but no active
* source case exists yet.
* Request: SubFunction, ControlFlags, PurgeBase,
* PurgeCount, then a list of salvageable file entry numbers
* unless PurgeAll is set.
* Reply: PurgeCount followed by per-entry completion codes.
* Future owner: filesystem/namespace salvage provider.
*/
result = -0xfb;
break;
case 0x2b : /* SDK 87/43 Revoke File Handle Rights.
* Coverage: documented 4.x file-handle-rights call, but no
* active source case exists yet.
* Request: SubFunction, reserved bytes, QueryFlag,
* FileHandle (Hi-Lo), RemoveOpenRights (Lo-Hi).
* Reply: FileHandle (Hi-Lo) and ResultantRights (Lo-Hi).
* Future owner: filesystem/namespace handle-rights provider.
*/
result = -0xfb;
break;
#endif
default : result = -0xfb; /* unknown request */