mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-05 18:27:06 +00:00
rootfs_is_blockdev: don't run if no rootfs is specified
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
cd62fd869c
commit
acf9f89e61
@ -3123,6 +3123,10 @@ bool rootfs_is_blockdev(struct lxc_conf *conf)
|
||||
struct stat st;
|
||||
int ret;
|
||||
|
||||
if (!conf->rootfs.path || strcmp(conf->rootfs.path, "/") == 0 ||
|
||||
strlen(conf->rootfs.path) == 0)
|
||||
return false;
|
||||
|
||||
ret = stat(conf->rootfs.path, &st);
|
||||
if (ret == 0 && S_ISBLK(st.st_mode))
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user