add SPDX-License-Identifier for all source

Add SPDX-License-Identifier for all existing codes.

Fixes: #2

Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
bin liu
2020-09-07 20:28:23 +08:00
parent ed1e8162d5
commit 86b245076c
25 changed files with 125 additions and 0 deletions

View File

@@ -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. //! This module contains the implementation of the `blkio` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -1,3 +1,8 @@
// Copyright (c) 2018 Levente Kurusa
//
// SPDX-License-Identifier: Apache-2.0 or MIT
//
//! This module handles cgroup operations. Start here! //! This module handles cgroup operations. Start here!
use crate::error::*; use crate::error::*;

View File

@@ -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. //! This module allows the user to create a control group using the Builder pattern.
//! # Example //! # Example
//! //!

View File

@@ -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. //! This module contains the implementation of the `cpu` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `cpuacct` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `cpuset` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `devices` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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::error::Error as StdError;
use std::fmt; use std::fmt;

View File

@@ -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. //! This module contains the implementation of the `freezer` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! 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 //! Currently, we only support the cgroupv1 hierarchy, but in the future we will add support for

View File

@@ -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. //! This module contains the implementation of the `hugetlb` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -1,3 +1,8 @@
// Copyright (c) 2018 Levente Kurusa
//
// SPDX-License-Identifier: Apache-2.0 or MIT
//
use log::*; use log::*;
use std::fs::File; use std::fs::File;

View File

@@ -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. //! This module contains the implementation of the `memory` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `net_cls` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `net_prio` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `perf_event` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `pids` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! This module contains the implementation of the `rdma` cgroup subsystem.
//! //!
//! See the Kernel's documentation for more information about this subsystem, found at: //! See the Kernel's documentation for more information about this subsystem, found at:

View File

@@ -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. //! Some simple tests covering the builder pattern for control groups.
use cgroups::*; use cgroups::*;
use cgroups::cpu::*; use cgroups::cpu::*;

View File

@@ -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. //! Simple unit tests about the control groups system.
use cgroups::{Cgroup, CgroupPid}; use cgroups::{Cgroup, CgroupPid};

View File

@@ -1,3 +1,8 @@
// Copyright (c) 2018 Levente Kurusa
//
// SPDX-License-Identifier: Apache-2.0 or MIT
//
use cgroups::cpuset::CpuSetController; use cgroups::cpuset::CpuSetController;
use cgroups::error::ErrorKind; use cgroups::error::ErrorKind;
use cgroups::Cgroup; use cgroups::Cgroup;

View File

@@ -1,3 +1,8 @@
// Copyright (c) 2018 Levente Kurusa
//
// SPDX-License-Identifier: Apache-2.0 or MIT
//
//! Integration tests about the devices subsystem //! Integration tests about the devices subsystem
use cgroups::devices::{DevicePermissions, DeviceType, DevicesController}; use cgroups::devices::{DevicePermissions, DeviceType, DevicesController};

View File

@@ -1,3 +1,8 @@
// Copyright (c) 2018 Levente Kurusa
//
// SPDX-License-Identifier: Apache-2.0 or MIT
//
//! Integration tests about the pids subsystem //! Integration tests about the pids subsystem
use cgroups::pid::{PidController, PidMax}; use cgroups::pid::{PidController, PidMax};
use cgroups::Controller; use cgroups::Controller;

View File

@@ -1,4 +1,9 @@
#!/bin/sh #!/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` CONTROL_GROUPS=`cargo test -- --list 2>/dev/null | egrep 'test$' | egrep -v '^src' | cut -d':' -f1`

View File

@@ -1,4 +1,9 @@
#!/bin/sh #!/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` CONTROL_GROUPS=`cargo test -- --list 2>/dev/null | egrep 'test$' | egrep -v '^src' | cut -d':' -f1`