mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Remove unused 'opts' field from LXC basic mounts struct
The virLXCBasicMountInfo struct contains a 'char *opts' field passed onto the mount() syscall. Every entry in the list sets this to NULL though, so it can be removed to simplify life. Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
ccacd4fe3b
commit
c6b84a9dee
@ -754,7 +754,6 @@ typedef struct {
|
|||||||
const char *src;
|
const char *src;
|
||||||
const char *dst;
|
const char *dst;
|
||||||
const char *type;
|
const char *type;
|
||||||
const char *opts;
|
|
||||||
int mflags;
|
int mflags;
|
||||||
} virLXCBasicMountInfo;
|
} virLXCBasicMountInfo;
|
||||||
|
|
||||||
@ -765,16 +764,16 @@ static const virLXCBasicMountInfo lxcBasicMounts[] = {
|
|||||||
* mount point in the main OS becomes readonly too which is not what
|
* mount point in the main OS becomes readonly too which is not what
|
||||||
* we want. Hence some things have two entries here.
|
* we want. Hence some things have two entries here.
|
||||||
*/
|
*/
|
||||||
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
{ "proc", "/proc", "proc", MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
||||||
{ "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND },
|
{ "/proc/sys", "/proc/sys", NULL, MS_BIND },
|
||||||
{ "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
|
{ "/proc/sys", "/proc/sys", NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
|
||||||
{ "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
{ "sysfs", "/sys", "sysfs", MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
||||||
{ "sysfs", "/sys", "sysfs", NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
|
{ "sysfs", "/sys", "sysfs", MS_BIND|MS_REMOUNT|MS_RDONLY },
|
||||||
{ "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
{ "securityfs", "/sys/kernel/security", "securityfs", MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
||||||
{ "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
|
{ "securityfs", "/sys/kernel/security", "securityfs", MS_BIND|MS_REMOUNT|MS_RDONLY },
|
||||||
#if WITH_SELINUX
|
#if WITH_SELINUX
|
||||||
{ SELINUX_MOUNT, SELINUX_MOUNT, "selinuxfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
{ SELINUX_MOUNT, SELINUX_MOUNT, "selinuxfs", MS_NOSUID|MS_NOEXEC|MS_NODEV },
|
||||||
{ SELINUX_MOUNT, SELINUX_MOUNT, NULL, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
|
{ SELINUX_MOUNT, SELINUX_MOUNT, NULL, MS_BIND|MS_REMOUNT|MS_RDONLY },
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -884,13 +883,13 @@ static int lxcContainerMountBasicFS(bool userns_enabled)
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
VIR_DEBUG("Mount %s on %s type=%s flags=%x, opts=%s",
|
VIR_DEBUG("Mount %s on %s type=%s flags=%x",
|
||||||
srcpath, mnt->dst, mnt->type, mnt->mflags, mnt->opts);
|
srcpath, mnt->dst, mnt->type, mnt->mflags);
|
||||||
if (mount(srcpath, mnt->dst, mnt->type, mnt->mflags, mnt->opts) < 0) {
|
if (mount(srcpath, mnt->dst, mnt->type, mnt->mflags, NULL) < 0) {
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Failed to mount %s on %s type %s flags=%x opts=%s"),
|
_("Failed to mount %s on %s type %s flags=%x"),
|
||||||
srcpath, mnt->dst, NULLSTR(mnt->type),
|
srcpath, mnt->dst, NULLSTR(mnt->type),
|
||||||
mnt->mflags, NULLSTR(mnt->opts));
|
mnt->mflags);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user