MCPcopy Create free account
hub / github.com/F-Stack/f-stack / mqfs_create_node

Function mqfs_create_node

freebsd/kern/uipc_mqueue.c:444–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444static struct mqfs_node *
445mqfs_create_node(const char *name, int namelen, struct ucred *cred, int mode,
446 int nodetype)
447{
448 struct mqfs_node *node;
449
450 node = mqnode_alloc();
451 strncpy(node->mn_name, name, namelen);
452 node->mn_pr_root = cred->cr_prison->pr_root;
453 node->mn_type = nodetype;
454 node->mn_refcount = 1;
455 vfs_timestamp(&node->mn_birth);
456 node->mn_ctime = node->mn_atime = node->mn_mtime
457 = node->mn_birth;
458 node->mn_uid = cred->cr_uid;
459 node->mn_gid = cred->cr_gid;
460 node->mn_mode = mode;
461 return (node);
462}
463
464/*
465 * Create a file

Callers 4

mqfs_create_fileFunction · 0.85
mqfs_create_dirFunction · 0.85
mqfs_create_linkFunction · 0.85
mqfs_initFunction · 0.85

Calls 3

mqnode_allocFunction · 0.85
strncpyFunction · 0.85
vfs_timestampFunction · 0.85

Tested by

no test coverage detected