diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-04-02 14:21:45 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-04-02 20:10:07 +0200 |
| commit | 3e679c51c03ac13a5b4b601873689925eda3cc16 (patch) | |
| tree | cc4d32d731ff4eca66ae2af36d3bd229b8f08a4d /docs/syscall_descriptions_syntax.md | |
| parent | 374050e90404a9eeea577d7c97fbc6ef0dacd478 (diff) | |
pkg/compiler: support non-zero terminated filenames
Now file names become:
string[filename]
with a possibility of using other string features:
stringnoz[filename]
string[filename, CONST_SIZE]
and filename is left as type alias as it is commonly used:
type filename string[filename]
Diffstat (limited to 'docs/syscall_descriptions_syntax.md')
| -rw-r--r-- | docs/syscall_descriptions_syntax.md | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/docs/syscall_descriptions_syntax.md b/docs/syscall_descriptions_syntax.md index 6d3306232..5e85a29d6 100644 --- a/docs/syscall_descriptions_syntax.md +++ b/docs/syscall_descriptions_syntax.md @@ -37,14 +37,11 @@ rest of the type-options are type-specific: direction (in/out/inout) "string": a zero-terminated memory buffer (no pointer indirection implied), type-options: either a string value in quotes for constant strings (e.g. "foo"), - or a reference to string flags, + or a reference to string flags (special value `filename` produces file names), optionally followed by a buffer size (string values will be padded with \x00 to that size) "stringnoz": a non-zero-terminated memory buffer (no pointer indirection implied), type-options: either a string value in quotes for constant strings (e.g. "foo"), or a reference to string flags, -"filename": a file/link/dir name, no pointer indirection implied, - in most cases you want `ptr[in, filename]`, type-options: - static size (optional) "fileoff": offset within a file "len": length of another field (for array it is number of elements), type-options: argname of the object @@ -182,6 +179,8 @@ type bool16 int16[0:1] type bool32 int32[0:1] type bool64 int64[0:1] type boolptr intptr[0:1] + +type filename string[filename] ``` ## Type Templates |
