Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
zx_system_get_version_string
摘要
获取系统的版本字符串。
声明
#include <zircon/syscalls.h>
zx_string_view_t zx_system_get_version_string(void);
说明
zx_system_get_version_string() 会返回一个字符串,用于标识
当前正在运行的 Zircon 系统
返回的对象是一对简单的 C 字符串指针和长度。通过
字符串肯定以 NUL 结尾,并且是有效的 UTF-8。长度
不包含 NUL 终止符。在 C++ 中,返回值可以强制转换
隐式传递给 std::string_view、std::u8string_view 或其他类型
等效的双参数构造函数签名。
字符串常量可以是任何长度。它位于提供的只读内存中
由 vDSO 指定。因此,它始终可通过
同一进程地址,并且其内容永不更改。
前四个字符标识版本方案。字符串示例
返回“git-8a07d52603404521038d8866b297f99de36f9162”。
权限
TODO(https://fxbug.dev/42107318)
返回值
zx_system_get_version_string() 会返回一个 zx_string_view_t 对象。
错误
zx_system_get_version_string() 不能失败。
备注
另请参阅
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-07-25。"],[],[]]