Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
interfaces/mount: add InfoEntry type #3129
Merged
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
5062133
interfaces/mount: add InfoEntry type
zyga a097ab5
Merge branch 'master' of github.com:snapcore/snapd into mountinfo-1
zyga f82c78c
tests: improve debug output
zyga f0ae8d5
Merge branch 'master' of github.com:snapcore/snapd into mountinfo-1
zyga 66b4003
Merge branch 'master' of github.com:snapcore/snapd into mountinfo-1
zyga
Jump to file or symbol
Failed to load files and symbols.
| @@ -0,0 +1,38 @@ | ||
| +// -*- Mode: Go; indent-tabs-mode: t -*- | ||
| + | ||
| +/* | ||
| + * Copyright (C) 2017 Canonical Ltd | ||
| + * | ||
| + * This program is free software: you can redistribute it and/or modify | ||
| + * it under the terms of the GNU General Public License version 3 as | ||
| + * published by the Free Software Foundation. | ||
| + * | ||
| + * This program is distributed in the hope that it will be useful, | ||
| + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| + * GNU General Public License for more details. | ||
| + * | ||
| + * You should have received a copy of the GNU General Public License | ||
| + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| + * | ||
| + */ | ||
| + | ||
| +package mount | ||
| + | ||
| +// InfoEntry contains data from /proc/$PID/mountinfo | ||
| +// | ||
| +// For details please refer to mountinfo documentation at | ||
| +// https://www.kernel.org/doc/Documentation/filesystems/proc.txt | ||
| +type InfoEntry struct { | ||
| + MountID int | ||
| + ParentID int | ||
| + DevMajor int | ||
| + DevMinor int | ||
| + Root string | ||
| + MountDir string | ||
| + MountOpts string | ||
| + OptionalFlds string | ||
| + FsType string | ||
| + MountSource string | ||
| + SuperOpts string | ||
| +} |
| @@ -0,0 +1,30 @@ | ||
| +// -*- Mode: Go; indent-tabs-mode: t -*- | ||
| + | ||
| +/* | ||
| + * Copyright (C) 2017 Canonical Ltd | ||
| + * | ||
| + * This program is free software: you can redistribute it and/or modify | ||
| + * it under the terms of the GNU General Public License version 3 as | ||
| + * published by the Free Software Foundation. | ||
| + * | ||
| + * This program is distributed in the hope that it will be useful, | ||
| + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| + * GNU General Public License for more details. | ||
| + * | ||
| + * You should have received a copy of the GNU General Public License | ||
| + * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| + * | ||
| + */ | ||
| + | ||
| +package mount_test | ||
| + | ||
| +import ( | ||
| + . "gopkg.in/check.v1" | ||
| + | ||
| + _ "github.com/snapcore/snapd/interfaces/mount" | ||
| +) | ||
| + | ||
| +type mountinfoSuite struct{} | ||
| + | ||
| +var _ = Suite(&mountinfoSuite{}) |