Commit acf9f89e by Serge Hallyn

rootfs_is_blockdev: don't run if no rootfs is specified

parent cd62fd86
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment