Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
17b51a93
Commit
17b51a93
authored
Mar 06, 2015
by
Paul Morie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix mount refactor nits
parent
2700871b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
fake.go
pkg/util/mount/fake.go
+2
-2
mount.go
pkg/util/mount/mount.go
+1
-1
No files found.
pkg/util/mount/fake.go
View file @
17b51a93
...
@@ -18,7 +18,7 @@ package mount
...
@@ -18,7 +18,7 @@ package mount
// FakeMounter implements mount.Interface.
// FakeMounter implements mount.Interface.
type
FakeMounter
struct
{
type
FakeMounter
struct
{
m
ountPoints
[]
MountPoint
M
ountPoints
[]
MountPoint
}
}
func
(
f
*
FakeMounter
)
Mount
(
source
string
,
target
string
,
fstype
string
,
flags
uintptr
,
data
string
)
error
{
func
(
f
*
FakeMounter
)
Mount
(
source
string
,
target
string
,
fstype
string
,
flags
uintptr
,
data
string
)
error
{
...
@@ -30,5 +30,5 @@ func (f *FakeMounter) Unmount(target string, flags int) error {
...
@@ -30,5 +30,5 @@ func (f *FakeMounter) Unmount(target string, flags int) error {
}
}
func
(
f
*
FakeMounter
)
List
()
([]
MountPoint
,
error
)
{
func
(
f
*
FakeMounter
)
List
()
([]
MountPoint
,
error
)
{
return
f
.
m
ountPoints
,
nil
return
f
.
M
ountPoints
,
nil
}
}
pkg/util/mount/mount.go
View file @
17b51a93
...
@@ -51,7 +51,7 @@ type MountPoint struct {
...
@@ -51,7 +51,7 @@ type MountPoint struct {
}
}
// Examines /proc/mounts to find all other references to the device referenced
// Examines /proc/mounts to find all other references to the device referenced
// by mountPath.
// by mountPath
; returns a list of paths
.
func
GetMountRefs
(
mounter
Interface
,
mountPath
string
)
([]
string
,
error
)
{
func
GetMountRefs
(
mounter
Interface
,
mountPath
string
)
([]
string
,
error
)
{
mps
,
err
:=
mounter
.
List
()
mps
,
err
:=
mounter
.
List
()
if
err
!=
nil
{
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment