conf: kill PAT_MAX bytes

parent 9c0fd29a
...@@ -2169,19 +2169,18 @@ skipabs: ...@@ -2169,19 +2169,18 @@ skipabs:
} }
static int mount_entry_on_relative_rootfs(struct mntent *mntent, static int mount_entry_on_relative_rootfs(struct mntent *mntent,
const struct lxc_rootfs *rootfs, struct lxc_rootfs *rootfs,
const char *lxc_name, const char *lxc_name,
const char *lxc_path) const char *lxc_path)
{ {
int ret; int ret;
char path[PATH_MAX];
/* relative to root mount point */ /* relative to root mount point */
ret = snprintf(path, sizeof(path), "%s/%s", rootfs->mount, mntent->mnt_dir); ret = snprintf(rootfs->buf, sizeof(rootfs->buf), "%s/%s", rootfs->mount, mntent->mnt_dir);
if (ret < 0 || (size_t)ret >= sizeof(path)) if (ret < 0 || (size_t)ret >= sizeof(rootfs->buf))
return -1; return -1;
return mount_entry_on_generic(mntent, path, rootfs, lxc_name, lxc_path); return mount_entry_on_generic(mntent, rootfs->buf, rootfs, lxc_name, lxc_path);
} }
static int mount_file_entries(struct lxc_rootfs *rootfs, FILE *file, static int mount_file_entries(struct lxc_rootfs *rootfs, FILE *file,
......
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