mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 21:52:57 +02:00
+ request fd_seek and fd_tell rights when opening a file
git-svn-id: trunk@49542 -
This commit is contained in:
parent
720068360e
commit
a5309a5d0c
@ -222,15 +222,15 @@ Begin
|
|||||||
{ We do the conversion of filemodes here, concentrated on 1 place }
|
{ We do the conversion of filemodes here, concentrated on 1 place }
|
||||||
case (flags and 3) of
|
case (flags and 3) of
|
||||||
0 : begin
|
0 : begin
|
||||||
fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_FILESTAT_GET;
|
fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_FILESTAT_GET or __WASI_RIGHTS_FD_SEEK or __WASI_RIGHTS_FD_TELL;
|
||||||
FileRec(f).mode:=fminput;
|
FileRec(f).mode:=fminput;
|
||||||
end;
|
end;
|
||||||
1 : begin
|
1 : begin
|
||||||
fs_rights_base :=__WASI_RIGHTS_FD_WRITE or __WASI_RIGHTS_FD_FILESTAT_GET;
|
fs_rights_base :=__WASI_RIGHTS_FD_WRITE or __WASI_RIGHTS_FD_FILESTAT_GET or __WASI_RIGHTS_FD_SEEK or __WASI_RIGHTS_FD_TELL;
|
||||||
FileRec(f).mode:=fmoutput;
|
FileRec(f).mode:=fmoutput;
|
||||||
end;
|
end;
|
||||||
2 : begin
|
2 : begin
|
||||||
fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_WRITE or __WASI_RIGHTS_FD_FILESTAT_GET;
|
fs_rights_base :=__WASI_RIGHTS_FD_READ or __WASI_RIGHTS_FD_WRITE or __WASI_RIGHTS_FD_FILESTAT_GET or __WASI_RIGHTS_FD_SEEK or __WASI_RIGHTS_FD_TELL;
|
||||||
FileRec(f).mode:=fminout;
|
FileRec(f).mode:=fminout;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user