aboutsummaryrefslogtreecommitdiff
path: root/lib/cgroup_file_handle.h
diff options
context:
space:
mode:
authorPasha <pasha@member.fsf.org>2023-07-17 20:05:02 +0000
committerPasha <pasha@member.fsf.org>2023-07-17 20:05:02 +0000
commit1a13003efe953b88b34fcadef536bb09859bad34 (patch)
tree847fbf10983d549f2ba5cca20145707a11364a22 /lib/cgroup_file_handle.h
downloadcontainercgroup-1a13003efe953b88b34fcadef536bb09859bad34.tar.gz
containercgroup-1a13003efe953b88b34fcadef536bb09859bad34.tar.bz2
initial release
Diffstat (limited to 'lib/cgroup_file_handle.h')
-rw-r--r--lib/cgroup_file_handle.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/cgroup_file_handle.h b/lib/cgroup_file_handle.h
new file mode 100644
index 0000000..763f1d0
--- /dev/null
+++ b/lib/cgroup_file_handle.h
@@ -0,0 +1,23 @@
+/*
+ Copyright (C) 2023 Pasha <pasha@bell01.com>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ 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 <https://www.gnu.org/licenses/>.
+*/
+
+#define _GNU_SOURCE
+#include <stdio.h>
+
+#define CGROUP_FILE_HANDLE_BYTES 8
+
+int get_cgroup_file_handle(const char *pathname, char *cgroupid);