summaryrefslogtreecommitdiff
path: root/internal/app/siftool/mount.go
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2022-11-26 11:30:56 -0500
committerReinhard Tartler <siretart@tauware.de>2022-11-26 11:30:56 -0500
commitd6caca7a938130982d713b6be0ca0823f46b0b4c (patch)
treedc35be0da27e89eb9208a44aabbd24b00df629db /internal/app/siftool/mount.go
parentdc1634f506b369be461ff65c77b2a804e06df87f (diff)
parentdab73e7c0f7576075e7f073f71cc3f32a656b161 (diff)
Update upstream source from tag 'upstream/2.8.3'
Update to upstream version '2.8.3' with Debian dir 7536ac56d7f18b29fd849f99100170df028e78fe
Diffstat (limited to 'internal/app/siftool/mount.go')
-rw-r--r--internal/app/siftool/mount.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/app/siftool/mount.go b/internal/app/siftool/mount.go
new file mode 100644
index 0000000..5da071b
--- /dev/null
+++ b/internal/app/siftool/mount.go
@@ -0,0 +1,20 @@
+// Copyright (c) 2022, Sylabs Inc. All rights reserved.
+// This software is licensed under a 3-clause BSD license. Please consult the
+// LICENSE file distributed with the sources of this project regarding your
+// rights to use or distribute this software.
+
+package siftool
+
+import (
+ "context"
+
+ "github.com/sylabs/sif/v2/pkg/user"
+)
+
+// Mount mounts the primary system partition of the SIF file at path into mountPath.
+func (a *App) Mount(ctx context.Context, path, mountPath string) error {
+ return user.Mount(ctx, path, mountPath,
+ user.OptMountStdout(a.opts.out),
+ user.OptMountStderr(a.opts.err),
+ )
+}