conf: mount_entry_on_systemfs()

non-functional changes Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent bdd2b34c
...@@ -1904,20 +1904,18 @@ static inline int mount_entry_on_generic(struct mntent *mntent, ...@@ -1904,20 +1904,18 @@ static inline int mount_entry_on_generic(struct mntent *mntent,
static inline int mount_entry_on_systemfs(struct mntent *mntent) static inline int mount_entry_on_systemfs(struct mntent *mntent)
{ {
char path[MAXPATHLEN];
int ret; int ret;
char path[MAXPATHLEN];
/* For containers created without a rootfs all mounts are treated as /* For containers created without a rootfs all mounts are treated as
* absolute paths starting at / on the host. */ * absolute paths starting at / on the host.
*/
if (mntent->mnt_dir[0] != '/') if (mntent->mnt_dir[0] != '/')
ret = snprintf(path, sizeof(path), "/%s", mntent->mnt_dir); ret = snprintf(path, sizeof(path), "/%s", mntent->mnt_dir);
else else
ret = snprintf(path, sizeof(path), "%s", mntent->mnt_dir); ret = snprintf(path, sizeof(path), "%s", mntent->mnt_dir);
if (ret < 0 || ret >= sizeof(path))
if (ret < 0 || ret >= sizeof(path)) {
ERROR("path name too long");
return -1; return -1;
}
return mount_entry_on_generic(mntent, path, NULL, NULL, NULL); return mount_entry_on_generic(mntent, path, NULL, NULL, NULL);
} }
......
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