tools: add shared current directory handle helper

Add tool_current_dhandle_only() as a small wrapper for callers that only need
the current NetWare directory handle.

Replace the local creator_current_dhandle() and tests_current_dhandle()
implementations in CREATOR and NWTESTS with the shared helper. This removes
duplicate requester-current-directory code without changing behavior.
This commit is contained in:
Mario Fetka
2026-05-29 09:38:08 +02:00
parent 5fa36cc6f4
commit b3cec8eecf
4 changed files with 24 additions and 64 deletions

1
net.h
View File

@@ -183,6 +183,7 @@ extern int tool_is_files_option(char *s);
extern int tool_is_subdirs_option(char *s);
extern int tool_get_current_drive(void);
extern int tool_current_dhandle(uint8 *connid, uint8 *dhandle);
extern int tool_current_dhandle_only(uint8 *dhandle);
extern int tool_current_prefix(char *out, int max);
extern int tool_is_current_path(char *path);
extern void tool_upcopy(char *dst, char *src, int max);