Skip to content

Commit d075d71

Browse files
committed
Export SysboxfsMounts in the syscont package.
Signed-off-by: Cesar Talledo <[email protected]>
1 parent 1b440ff commit d075d71

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

libsysbox/syscont/spec.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ var syscontMounts = []specs.Mount{
9292
// Container mounts virtualized by sysbox-fs
9393
//
9494
// TODO: in the future get these from sysbox-fs via grpc
95-
var sysboxFsMounts = []specs.Mount{
95+
var SysboxfsMounts = []specs.Mount{
9696
//
9797
// procfs mounts
9898
//
@@ -532,7 +532,7 @@ func cfgMounts(spec *specs.Spec, sysbox *sysbox.Sysbox) error {
532532
}
533533

534534
if sysFs.Enabled() {
535-
cfgSysboxFsMounts(spec, sysFs)
535+
cfgSysboxfsMounts(spec, sysFs)
536536
}
537537

538538
if sysMgr.Enabled() {
@@ -644,20 +644,20 @@ func cfgSyscontMountsReadOnly(sysMgr *sysbox.Mgr, spec *specs.Spec) {
644644
spec.Mounts = append(spec.Mounts, tmpMounts...)
645645
}
646646

647-
// cfgSysboxFsMounts adds the sysbox-fs mounts to the container's config.
648-
func cfgSysboxFsMounts(spec *specs.Spec, sysFs *sysbox.Fs) {
647+
// cfgSysboxfsMounts adds the sysbox-fs mounts to the container's config.
648+
func cfgSysboxfsMounts(spec *specs.Spec, sysFs *sysbox.Fs) {
649649

650-
spec.Mounts = utils.MountSliceRemove(spec.Mounts, sysboxFsMounts, func(m1, m2 specs.Mount) bool {
650+
spec.Mounts = utils.MountSliceRemove(spec.Mounts, SysboxfsMounts, func(m1, m2 specs.Mount) bool {
651651
return m1.Destination == m2.Destination
652652
})
653653

654-
// Adjust sysboxFsMounts path attending to container-id value.
654+
// Adjust SysboxfsMounts path attending to container-id value.
655655
cntrMountpoint := filepath.Join(sysFs.Mountpoint, sysFs.Id)
656656

657-
for i := range sysboxFsMounts {
658-
sysboxFsMounts[i].Source =
657+
for i := range SysboxfsMounts {
658+
SysboxfsMounts[i].Source =
659659
strings.Replace(
660-
sysboxFsMounts[i].Source,
660+
SysboxfsMounts[i].Source,
661661
SysboxFsDir,
662662
cntrMountpoint,
663663
1,
@@ -675,12 +675,12 @@ func cfgSysboxFsMounts(spec *specs.Spec, sysFs *sysbox.Fs) {
675675
// remounted to read-only after the container setup completes, right before
676676
// starting the container's init process.
677677
if spec.Root.Readonly {
678-
for _, m := range sysboxFsMounts {
678+
for _, m := range SysboxfsMounts {
679679
spec.Linux.ReadonlyPaths = append(spec.Linux.ReadonlyPaths, m.Destination)
680680
}
681681
}
682682

683-
spec.Mounts = append(spec.Mounts, sysboxFsMounts...)
683+
spec.Mounts = append(spec.Mounts, SysboxfsMounts...)
684684
}
685685

686686
// cfgSystemdMounts adds systemd related mounts to the spec

0 commit comments

Comments
 (0)