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/terminal-util.h | |
parent | 401e860cb88d406b2683bd2c8c8ba97c0a223e36 (diff) | |
download | systemd-ef31828d06b794f548928e46718f8b152a8e7fed.tar.gz |
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/terminal-util.h')
-rw-r--r-- | src/basic/terminal-util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/basic/terminal-util.h b/src/basic/terminal-util.h index 798bab6c26..98c6706a24 100644 --- a/src/basic/terminal-util.h +++ b/src/basic/terminal-util.h @@ -67,16 +67,16 @@ int open_terminal(const char *name, int mode); /* Flags for tweaking the way we become the controlling process of a terminal. */ typedef enum AcquireTerminalFlags { /* Try to become the controlling process of the TTY. If we can't return -EPERM. */ - ACQUIRE_TERMINAL_TRY = 0, + ACQUIRE_TERMINAL_TRY = 0, /* Tell the kernel to forcibly make us the controlling process of the TTY. Returns -EPERM if the kernel doesn't allow that. */ - ACQUIRE_TERMINAL_FORCE = 1, + ACQUIRE_TERMINAL_FORCE = 1, /* If we can't become the controlling process of the TTY right-away, then wait until we can. */ - ACQUIRE_TERMINAL_WAIT = 2, + ACQUIRE_TERMINAL_WAIT = 2, /* Pick one of the above, and then OR this flag in, in order to request permissive behaviour, if we can't become controlling process then don't mind */ - ACQUIRE_TERMINAL_PERMISSIVE = 4, + ACQUIRE_TERMINAL_PERMISSIVE = 1 << 2, } AcquireTerminalFlags; int acquire_terminal(const char *name, AcquireTerminalFlags flags, usec_t timeout); @@ -162,7 +162,7 @@ int terminal_urlify(const char *url, const char *text, char **ret); int terminal_urlify_path(const char *path, const char *text, char **ret); typedef enum CatFlags { - CAT_FLAGS_MAIN_FILE_OPTIONAL = 1 << 1, + CAT_FLAGS_MAIN_FILE_OPTIONAL = 1 << 0, } CatFlags; int cat_files(const char *file, char **dropins, CatFlags flags); |