def sys_open(self, buf, flags, mode):
filename = self.current.read_string(buf)<EOL>try:<EOL><INDENT>f = self._sys_open_get_file(filename, flags)<EOL>logger.debug(f"<STR_LIT>")<EOL><DEDENT>except IOError as e:<EOL><INDENT>logger.warning(f"<STR_LIT>")<EOL>return -e.errno if e.errno is not None else -errno.EINVAL<EOL><DEDENT>return self._open(f)<EOL>
:param buf: address of zero-terminated pathname
:param flags: file access bits
:param mode: file permission mode