Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\utsname.c Create Date:2022-07-28 11:18:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:struct uts_namespace *copy_utsname(unsigned long flags, struct user_namespace *user_ns, struct uts_namespace *old_ns)

Type:struct uts_namespace

Parameter:

TypeParameterName
unsigned longflags
struct user_namespace *user_ns
struct uts_namespace *old_ns
94  BUG_ON(!old_ns)
95  get_uts_ns(old_ns)
97  If Not (flags & New utsname namespace ) Then Return 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  Return new_ns