]>
Commit | Line | Data |
---|---|---|
53e1b683 | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
78f22b97 LP |
2 | #pragma once |
3 | ||
4 | /*** | |
5 | This file is part of systemd. | |
6 | ||
7 | Copyright 2010 Lennart Poettering | |
78f22b97 LP |
8 | ***/ |
9 | ||
10 | #include <sys/resource.h> | |
11 | ||
12 | #include "macro.h" | |
13 | ||
14 | const char *rlimit_to_string(int i) _const_; | |
15 | int rlimit_from_string(const char *s) _pure_; | |
16 | ||
17 | int setrlimit_closest(int resource, const struct rlimit *rlim); | |
18 | ||
d0a7c5f6 LP |
19 | int rlimit_parse_one(int resource, const char *val, rlim_t *ret); |
20 | int rlimit_parse(int resource, const char *val, struct rlimit *ret); | |
21 | ||
99d4f5e5 LP |
22 | int rlimit_format(const struct rlimit *rl, char **ret); |
23 | ||
78f22b97 | 24 | #define RLIMIT_MAKE_CONST(lim) ((struct rlimit) { lim, lim }) |