diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-06-07 16:03:43 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-06-12 21:44:00 +0200 |
commit | ef31828d06b794f548928e46718f8b152a8e7fed (patch) | |
tree | 70b61c6b3c9e1af3102bcd3aea456ec4f67e8bfb /src/basic/process-util.h | |
parent | Merge pull request #8849 from irtimmer/feature/dns-over-tls (diff) | |
download | systemd-ef31828d06b794f548928e46718f8b152a8e7fed.tar.xz systemd-ef31828d06b794f548928e46718f8b152a8e7fed.zip |
tree-wide: unify how we define bit mak enums
Let's always write "1 << 0", "1 << 1" and so on, except where we need
more than 31 flag bits, where we write "UINT64(1) << 0", and so on to force
64bit values.
Diffstat (limited to 'src/basic/process-util.h')
-rw-r--r-- | src/basic/process-util.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/basic/process-util.h b/src/basic/process-util.h index ba6fea6891..0f8865f1fb 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -51,8 +51,8 @@ int get_process_ppid(pid_t pid, pid_t *ppid); int wait_for_terminate(pid_t pid, siginfo_t *status); typedef enum WaitFlags { - WAIT_LOG_ABNORMAL = 1U << 0, - WAIT_LOG_NON_ZERO_EXIT_STATUS = 1U << 1, + WAIT_LOG_ABNORMAL = 1 << 0, + WAIT_LOG_NON_ZERO_EXIT_STATUS = 1 << 1, /* A shortcut for requesting the most complete logging */ WAIT_LOG = WAIT_LOG_ABNORMAL|WAIT_LOG_NON_ZERO_EXIT_STATUS, @@ -155,15 +155,15 @@ void reset_cached_pid(void); int must_be_root(void); typedef enum ForkFlags { - FORK_RESET_SIGNALS = 1U << 0, - FORK_CLOSE_ALL_FDS = 1U << 1, - FORK_DEATHSIG = 1U << 2, - FORK_NULL_STDIO = 1U << 3, - FORK_REOPEN_LOG = 1U << 4, - FORK_LOG = 1U << 5, - FORK_WAIT = 1U << 6, - FORK_NEW_MOUNTNS = 1U << 7, - FORK_MOUNTNS_SLAVE = 1U << 8, + FORK_RESET_SIGNALS = 1 << 0, + FORK_CLOSE_ALL_FDS = 1 << 1, + FORK_DEATHSIG = 1 << 2, + FORK_NULL_STDIO = 1 << 3, + FORK_REOPEN_LOG = 1 << 4, + FORK_LOG = 1 << 5, + FORK_WAIT = 1 << 6, + FORK_NEW_MOUNTNS = 1 << 7, + FORK_MOUNTNS_SLAVE = 1 << 8, } ForkFlags; int safe_fork_full(const char *name, const int except_fds[], size_t n_except_fds, ForkFlags flags, pid_t *ret_pid); |