| 442 | } |
| 443 | |
| 444 | static struct mqfs_node * |
| 445 | mqfs_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 |
no test coverage detected