From 86b245076c6a20e8d03d282112515061eb524d1f Mon Sep 17 00:00:00 2001 From: bin liu Date: Mon, 7 Sep 2020 20:28:23 +0800 Subject: [PATCH] add SPDX-License-Identifier for all source Add SPDX-License-Identifier for all existing codes. Fixes: #2 Signed-off-by: bin liu --- src/blkio.rs | 5 +++++ src/cgroup.rs | 5 +++++ src/cgroup_builder.rs | 5 +++++ src/cpu.rs | 5 +++++ src/cpuacct.rs | 5 +++++ src/cpuset.rs | 5 +++++ src/devices.rs | 5 +++++ src/error.rs | 5 +++++ src/freezer.rs | 5 +++++ src/hierarchies.rs | 5 +++++ src/hugetlb.rs | 5 +++++ src/lib.rs | 5 +++++ src/memory.rs | 5 +++++ src/net_cls.rs | 5 +++++ src/net_prio.rs | 5 +++++ src/perf_event.rs | 5 +++++ src/pid.rs | 5 +++++ src/rdma.rs | 5 +++++ tests/builder.rs | 5 +++++ tests/cgroup.rs | 5 +++++ tests/cpuset.rs | 5 +++++ tests/devices.rs | 5 +++++ tests/pids.rs | 5 +++++ tools/create_cgroup.sh | 5 +++++ tools/delete_cgroup.sh | 5 +++++ 25 files changed, 125 insertions(+) diff --git a/src/blkio.rs b/src/blkio.rs index fa55f64..5e4cf3d 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 140a4f4..45b47db 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 31999c8..7f5f455 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 3e43ea8..c4fc792 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 b7b679a..12d757a 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 70eb4ec..59f3cca 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 632ee27..53e2d9d 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 368251a..43b7fe9 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 5c3b1b7..7269b30 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 e6ed645..15c4cee 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::fs::File; diff --git a/src/memory.rs b/src/memory.rs index d7acaf8..0e3e6fb 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 d7f42d2..e4c4100 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 45c1112..05e2919 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 8b15d9a..83b5ebe 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}; diff --git a/tests/cpuset.rs b/tests/cpuset.rs index c7a8fb0..2f5ff93 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; diff --git a/tests/devices.rs b/tests/devices.rs index 2fbb305..b79c626 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 4c91e54..0cc0a95 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, PidMax}; 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`