函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\utsname.c Create Date:2022-07-27 12:20:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Copy task tsk's utsname namespace, or clone it if flags* specifies CLONE_NEWUTS. In latter case, changes to the* utsname of this process won't be seen by parent, and vice* versa.

函数原型:struct uts_namespace *copy_utsname(unsigned long flags, struct user_namespace *user_ns, struct uts_namespace *old_ns)

返回类型:struct uts_namespace

参数:

类型参数名称
unsigned longflags
struct user_namespace *user_ns
struct uts_namespace *old_ns
94  BUG_ON(!old_ns)
95  get_uts_ns(old_ns)
97  如果非flags按位与新主机空间的值则返回:old_ns
100  new_ns等于Clone a new ns copying an original utsname, setting refcount to 1*@old_ns: namespace to clone* Return ERR_PTR(-ENOMEM) on error (failure to allocate), new ns otherwise
102  put_uts_ns(old_ns)
103  返回:new_ns