From 3e679c51c03ac13a5b4b601873689925eda3cc16 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 2 Apr 2018 14:21:45 +0200 Subject: 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] --- docs/syscall_descriptions_syntax.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'docs/syscall_descriptions_syntax.md') 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 -- cgit mrf-deployment