From 36633d3cb46b1a197ea7e038372c7bd5d89799b7 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Tue, 28 Apr 2015 09:20:32 +0800 Subject: [PATCH] remove unused functions Seems no one is using them. Signed-off-by: Qiang Huang --- cgroups/fs/apply_raw.go | 13 ------------- cgroups/systemd/apply_nosystemd.go | 4 ---- cgroups/systemd/apply_systemd.go | 6 ------ 3 files changed, 23 deletions(-) diff --git a/cgroups/fs/apply_raw.go b/cgroups/fs/apply_raw.go index d31f894b..fa6478b5 100644 --- a/cgroups/fs/apply_raw.go +++ b/cgroups/fs/apply_raw.go @@ -131,19 +131,6 @@ func (m *Manager) GetPaths() map[string]string { return m.Paths } -// Symmetrical public function to update device based cgroups. Also available -// in the systemd implementation. -func ApplyDevices(c *configs.Cgroup, pid int) error { - d, err := getCgroupData(c, pid) - if err != nil { - return err - } - - devices := subsystems["devices"] - - return devices.Apply(d) -} - func (m *Manager) GetStats() (*cgroups.Stats, error) { stats := cgroups.NewStats() for name, path := range m.Paths { diff --git a/cgroups/systemd/apply_nosystemd.go b/cgroups/systemd/apply_nosystemd.go index 95ed4ea7..9b605b3c 100644 --- a/cgroups/systemd/apply_nosystemd.go +++ b/cgroups/systemd/apply_nosystemd.go @@ -46,10 +46,6 @@ func (m *Manager) Freeze(state configs.FreezerState) error { return fmt.Errorf("Systemd not supported") } -func ApplyDevices(c *configs.Cgroup, pid int) error { - return fmt.Errorf("Systemd not supported") -} - func Freeze(c *configs.Cgroup, state configs.FreezerState) error { return fmt.Errorf("Systemd not supported") } diff --git a/cgroups/systemd/apply_systemd.go b/cgroups/systemd/apply_systemd.go index c2ea56d6..2ba10cbb 100644 --- a/cgroups/systemd/apply_systemd.go +++ b/cgroups/systemd/apply_systemd.go @@ -401,12 +401,6 @@ func joinDevices(c *configs.Cgroup, pid int) error { return devices.Set(path, c) } -// Symmetrical public function to update device based cgroups. Also available -// in the fs implementation. -func ApplyDevices(c *configs.Cgroup, pid int) error { - return joinDevices(c, pid) -} - func joinMemory(c *configs.Cgroup, pid int) error { memorySwap := c.MemorySwap