debug + interne mars_nwe to V3-Trustee-Bitmaske
All checks were successful
Source release / source-package (push) Successful in 48s

This commit is contained in:
Mario Fetka
2026-05-25 14:58:47 +02:00
parent 571c356e70
commit 9c76ddcb17

View File

@@ -76,6 +76,22 @@ static char *prog_title;
static int req_printed=0;
static int trustee_v3_to_ncp22_rights(int rights)
{
int ncp22 = 0;
if (rights & 0x100) ncp22 |= 0x01; /* Supervisor */
if (rights & 0x001) ncp22 |= 0x02; /* Read */
if (rights & 0x002) ncp22 |= 0x04; /* Write */
if (rights & 0x008) ncp22 |= 0x08; /* Create */
if (rights & 0x010) ncp22 |= 0x10; /* Erase */
if (rights & 0x080) ncp22 |= 0x20; /* Modify */
if (rights & 0x040) ncp22 |= 0x40; /* File Scan */
if (rights & 0x020) ncp22 |= 0x80; /* Access Control */
return(ncp22);
}
#if !CALL_NWCONN_OVER_SOCKET
static char* nwconn_state; /* shared memory segment will be
* attached to this pointer */
@@ -1084,11 +1100,12 @@ static int handle_ncp_serv(void)
result = nw_get_eff_dir_rights(dir_handle, path, pathlen, 1);
if (result > -1){
U16_TO_16(result, xdata->eff_rights);
int ncp22_rights = trustee_v3_to_ncp22_rights(result);
U16_TO_16(ncp22_rights, xdata->eff_rights);
data_len = sizeof(struct XDATA);
XDPRINTF((1,0,
"NCP22/42 GetEffectiveRights: dh=%d pathlen=%d path=`%s` rights=0x%04x",
dir_handle, pathlen, pathbuf, result));
"NCP22/42 GetEffectiveRights: dh=%d pathlen=%d path=`%s` rights=0x%04x ncp22=0x%04x",
dir_handle, pathlen, pathbuf, result, ncp22_rights));
} else {
completition = (uint8) (-result);
XDPRINTF((1,0,