diff --git a/src/blkio.rs b/src/blkio.rs index 5d00ade..8ddcbd2 100644 --- a/src/blkio.rs +++ b/src/blkio.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `blkio` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/cgroup.rs b/src/cgroup.rs index ece6609..4ce9ce5 100644 --- a/src/cgroup.rs +++ b/src/cgroup.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module handles cgroup operations. Start here! use crate::error::*; diff --git a/src/cgroup_builder.rs b/src/cgroup_builder.rs index 1b4293b..e32d765 100644 --- a/src/cgroup_builder.rs +++ b/src/cgroup_builder.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module allows the user to create a control group using the Builder pattern. //! # Example //! diff --git a/src/cpu.rs b/src/cpu.rs index 2cbeed0..e02e9eb 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `cpu` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/cpuacct.rs b/src/cpuacct.rs index ec3b967..0325723 100644 --- a/src/cpuacct.rs +++ b/src/cpuacct.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `cpuacct` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/cpuset.rs b/src/cpuset.rs index 7b5b7fa..2f04ecf 100644 --- a/src/cpuset.rs +++ b/src/cpuset.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `cpuset` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/devices.rs b/src/devices.rs index 90c386d..09628c4 100644 --- a/src/devices.rs +++ b/src/devices.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `devices` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/error.rs b/src/error.rs index 7bfea9b..759d1a8 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + use std::error::Error as StdError; use std::fmt; diff --git a/src/freezer.rs b/src/freezer.rs index 59889e5..f8729ad 100644 --- a/src/freezer.rs +++ b/src/freezer.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `freezer` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/hierarchies.rs b/src/hierarchies.rs index 8f27ec4..c6e1b1e 100644 --- a/src/hierarchies.rs +++ b/src/hierarchies.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module represents the various control group hierarchies the Linux kernel supports. //! //! Currently, we only support the cgroupv1 hierarchy, but in the future we will add support for diff --git a/src/hugetlb.rs b/src/hugetlb.rs index 80aedf4..5aa8edf 100644 --- a/src/hugetlb.rs +++ b/src/hugetlb.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `hugetlb` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/lib.rs b/src/lib.rs index b4a64d6..546581b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + use log::*; use std::collections::HashMap; diff --git a/src/memory.rs b/src/memory.rs index 8f63b9b..461c50c 100644 --- a/src/memory.rs +++ b/src/memory.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `memory` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/net_cls.rs b/src/net_cls.rs index c3057f9..13a2366 100644 --- a/src/net_cls.rs +++ b/src/net_cls.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `net_cls` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/net_prio.rs b/src/net_prio.rs index 6c2ed7b..6d4cbe0 100644 --- a/src/net_prio.rs +++ b/src/net_prio.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `net_prio` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/perf_event.rs b/src/perf_event.rs index 4f52b1b..e7ffe6d 100644 --- a/src/perf_event.rs +++ b/src/perf_event.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `perf_event` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/pid.rs b/src/pid.rs index 4eb6754..2fadbea 100644 --- a/src/pid.rs +++ b/src/pid.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `pids` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/src/rdma.rs b/src/rdma.rs index fb9dcc6..0611bb6 100644 --- a/src/rdma.rs +++ b/src/rdma.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! This module contains the implementation of the `rdma` cgroup subsystem. //! //! See the Kernel's documentation for more information about this subsystem, found at: diff --git a/tests/builder.rs b/tests/builder.rs index e44bb5b..69a187c 100644 --- a/tests/builder.rs +++ b/tests/builder.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! Some simple tests covering the builder pattern for control groups. use cgroups::*; use cgroups::cpu::*; diff --git a/tests/cgroup.rs b/tests/cgroup.rs index f78c20b..6833f6f 100644 --- a/tests/cgroup.rs +++ b/tests/cgroup.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! Simple unit tests about the control groups system. use cgroups::{Cgroup, CgroupPid, Hierarchy, Subsystem}; use cgroups::memory::{MemController, SetMemory}; diff --git a/tests/cpuset.rs b/tests/cpuset.rs index aba3163..30a6176 100644 --- a/tests/cpuset.rs +++ b/tests/cpuset.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + use cgroups::cpuset::CpuSetController; use cgroups::error::ErrorKind; use cgroups::{Cgroup, CgroupPid, CpuResources, Hierarchy, Resources}; diff --git a/tests/devices.rs b/tests/devices.rs index 235351a..2714666 100644 --- a/tests/devices.rs +++ b/tests/devices.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! Integration tests about the devices subsystem use cgroups::devices::{DevicePermissions, DeviceType, DevicesController}; diff --git a/tests/pids.rs b/tests/pids.rs index ead4c46..a33ecb3 100644 --- a/tests/pids.rs +++ b/tests/pids.rs @@ -1,3 +1,8 @@ +// Copyright (c) 2018 Levente Kurusa +// +// SPDX-License-Identifier: Apache-2.0 or MIT +// + //! Integration tests about the pids subsystem use cgroups::pid::{PidController}; use cgroups::Controller; diff --git a/tools/create_cgroup.sh b/tools/create_cgroup.sh index 49dbfa0..96407ad 100755 --- a/tools/create_cgroup.sh +++ b/tools/create_cgroup.sh @@ -1,4 +1,9 @@ #!/bin/sh +# +# Copyright (c) 2018 Levente Kurusa +# +# SPDX-License-Identifier: Apache-2.0 or MIT +# CONTROL_GROUPS=`cargo test -- --list 2>/dev/null | egrep 'test$' | egrep -v '^src' | cut -d':' -f1` diff --git a/tools/delete_cgroup.sh b/tools/delete_cgroup.sh index f3f83a3..e728cb5 100755 --- a/tools/delete_cgroup.sh +++ b/tools/delete_cgroup.sh @@ -1,4 +1,9 @@ #!/bin/sh +# +# Copyright (c) 2018 Levente Kurusa +# +# SPDX-License-Identifier: Apache-2.0 or MIT +# CONTROL_GROUPS=`cargo test -- --list 2>/dev/null | egrep 'test$' | egrep -v '^src' | cut -d':' -f1`