-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import docker/docker/pkg/mount into runc
This will help get rid of docker/docker dependency in runc 👼 Signed-off-by: Vincent Demeester <vincent@sbr.pm>
- Loading branch information
1 parent
ababa2d
commit 3ca4c78
Showing
17 changed files
with
26 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package mount | ||
|
||
// GetMounts retrieves a list of mounts for the current running process. | ||
func GetMounts() ([]*Info, error) { | ||
return parseMountTable() | ||
} | ||
|
||
// Mounted looks at /proc/self/mountinfo to determine of the specified | ||
// mountpoint has been mounted | ||
func Mounted(mountpoint string) (bool, error) { | ||
entries, err := parseMountTable() | ||
if err != nil { | ||
return false, err | ||
} | ||
|
||
// Search the table for the mountpoint | ||
for _, e := range entries { | ||
if e.Mountpoint == mountpoint { | ||
return true, nil | ||
} | ||
} | ||
return false, nil | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
48 changes: 0 additions & 48 deletions
48
vendor/github.com/docker/docker/pkg/mount/flags_freebsd.go
This file was deleted.
Oops, something went wrong.
85 changes: 0 additions & 85 deletions
85
vendor/github.com/docker/docker/pkg/mount/flags_linux.go
This file was deleted.
Oops, something went wrong.
30 changes: 0 additions & 30 deletions
30
vendor/github.com/docker/docker/pkg/mount/flags_unsupported.go
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.