tests: use WebSDK entry-id path layout for AFP open fork smoke
All checks were successful
Source release / source-package (push) Successful in 51s

This commit is contained in:
Mario Fetka
2026-05-30 23:41:34 +02:00
parent b3a5468441
commit 362a5779cb

View File

@@ -99,11 +99,10 @@ static void cpu_to_le32(uint32_t v, uint8_t p[4])
static NWCCODE afp_get_entry_id_from_path(NWCONN_HANDLE conn, const char *path,
uint32_t volume_number,
uint32_t *entry_id)
{
NW_FRAGMENT reply;
uint8_t request[1 + 4 + 1 + 255];
uint8_t request[1 + 1 + 255];
uint8_t reply_buf[4];
size_t path_len = strlen(path);
NWCCODE err;
@@ -111,17 +110,16 @@ static NWCCODE afp_get_entry_id_from_path(NWCONN_HANDLE conn, const char *path,
if (path_len > 255)
return NWE_INVALID_PATH;
request[0] = (uint8_t)volume_number;
cpu_to_be32(0, request + 1);
request[5] = (uint8_t)path_len;
memcpy(request + 6, path, path_len);
request[0] = 0; /* directory handle 0, raw VOL:path */
request[1] = (uint8_t)path_len;
memcpy(request + 2, path, path_len);
memset(reply_buf, 0, sizeof(reply_buf));
reply.fragAddr.rw = reply_buf;
reply.fragSize = sizeof(reply_buf);
err = NWRequestSimple(conn, NCPC_SFN(0x23, 0x0c),
request, 6 + path_len, &reply);
request, 2 + path_len, &reply);
if (err)
return err;
if (reply.fragSize < 4)
@@ -239,8 +237,7 @@ int main(int argc, char **argv)
}
if (entry_id_only && !base_entry_id) {
err = afp_get_entry_id_from_path(conn, path, volume_number,
&base_entry_id);
err = afp_get_entry_id_from_path(conn, path, &base_entry_id);
if (err) {
fprintf(stderr,
"AFP Get Entry ID From Path Name failed before entry-id-only open: completion=0x%02x (%u) path=%s\n",