mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 14:30:32 +00:00
conf: use mknod() to create dummy mount target
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
77a3980598
commit
6947153da5
@ -892,13 +892,11 @@ static int lxc_setup_ttys(struct lxc_conf *conf)
|
||||
if (ret < 0 || (size_t)ret >= sizeof(lxcpath))
|
||||
return -1;
|
||||
|
||||
ret = creat(lxcpath, 0660);
|
||||
ret = mknod(path, S_IFREG, 0);
|
||||
if (ret < 0 && errno != EEXIST) {
|
||||
SYSERROR("Failed to create \"%s\"", lxcpath);
|
||||
return -1;
|
||||
}
|
||||
if (ret >= 0)
|
||||
close(ret);
|
||||
|
||||
ret = unlink(path);
|
||||
if (ret < 0 && errno != ENOENT) {
|
||||
|
Loading…
Reference in New Issue
Block a user