]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: unify how we define bit mak enums
authorLennart Poettering <lennart@poettering.net>
Thu, 7 Jun 2018 14:03:43 +0000 (16:03 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 12 Jun 2018 19:44:00 +0000 (21:44 +0200)
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.

22 files changed:
src/basic/conf-files.h
src/basic/copy.h
src/basic/fileio.h
src/basic/fs-util.h
src/basic/label.h
src/basic/process-util.h
src/basic/reboot-util.h
src/basic/terminal-util.h
src/core/execute.h
src/core/mount-setup.c
src/core/unit.h
src/delta/delta.c
src/libsystemd/sd-bus/bus-objects.c
src/nspawn/nspawn-mount.h
src/portable/portable.h
src/shared/ask-password-api.h
src/shared/bus-util.h
src/shared/conf-parser.h
src/shared/install.c
src/shared/install.h
src/shared/path-lookup.h
src/shared/seccomp-util.h

index 78d03e6e0d9efbe5e375bc676ae2e327bc5affd4..a3adc0828e2df7a4591d15404b308f6fd7ced8a5 100644 (file)
@@ -9,11 +9,11 @@
 ***/
 
 enum {
-        CONF_FILES_EXECUTABLE    = 1U << 0,
-        CONF_FILES_REGULAR       = 1U << 1,
-        CONF_FILES_DIRECTORY     = 1U << 2,
-        CONF_FILES_BASENAME      = 1U << 3,
-        CONF_FILES_FILTER_MASKED = 1U << 4,
+        CONF_FILES_EXECUTABLE    = 1 << 0,
+        CONF_FILES_REGULAR       = 1 << 1,
+        CONF_FILES_DIRECTORY     = 1 << 2,
+        CONF_FILES_BASENAME      = 1 << 3,
+        CONF_FILES_FILTER_MASKED = 1 << 4,
 };
 
 int conf_files_list(char ***ret, const char *suffix, const char *root, unsigned flags, const char *dir, ...);
index fa84ba494eb7faff061d33298ea2ff3ead2b42db..71a7e4508a6a774850dfc8cc1adabf2c415b7bcc 100644 (file)
 #include <sys/types.h>
 
 typedef enum CopyFlags {
-        COPY_REFLINK    = 1U << 0, /* Try to reflink */
-        COPY_MERGE      = 1U << 1, /* Merge existing trees with our new one to copy */
-        COPY_REPLACE    = 1U << 2, /* Replace an existing file if there's one */
-        COPY_SAME_MOUNT = 1U << 3, /* Don't descend recursively into other file systems, across mount point boundaries */
+        COPY_REFLINK    = 1 << 0, /* Try to reflink */
+        COPY_MERGE      = 1 << 1, /* Merge existing trees with our new one to copy */
+        COPY_REPLACE    = 1 << 2, /* Replace an existing file if there's one */
+        COPY_SAME_MOUNT = 1 << 3, /* Don't descend recursively into other file systems, across mount point boundaries */
 } CopyFlags;
 
 int copy_file_fd(const char *from, int to, CopyFlags copy_flags);
index 744d319abe7c34be11cbbb736779b9fd5d1c342a..a5ff1fb6ba52cf6fd722881a796b72f5f5f06de0 100644 (file)
 #include "time-util.h"
 
 typedef enum {
-        WRITE_STRING_FILE_CREATE            = 1<<0,
-        WRITE_STRING_FILE_ATOMIC            = 1<<1,
-        WRITE_STRING_FILE_AVOID_NEWLINE     = 1<<2,
-        WRITE_STRING_FILE_VERIFY_ON_FAILURE = 1<<3,
-        WRITE_STRING_FILE_SYNC              = 1<<4,
-        WRITE_STRING_FILE_DISABLE_BUFFER    = 1<<5,
+        WRITE_STRING_FILE_CREATE            = 1 << 0,
+        WRITE_STRING_FILE_ATOMIC            = 1 << 1,
+        WRITE_STRING_FILE_AVOID_NEWLINE     = 1 << 2,
+        WRITE_STRING_FILE_VERIFY_ON_FAILURE = 1 << 3,
+        WRITE_STRING_FILE_SYNC              = 1 << 4,
+        WRITE_STRING_FILE_DISABLE_BUFFER    = 1 << 5,
 
         /* And before you wonder, why write_string_file_atomic_label_ts() is a separate function instead of just one
            more flag here: it's about linking: we don't want to pull -lselinux into all users of write_string_file()
index 4923a30074a00cb96b7077fc33305ac9085b09cc..4d0ed641b4f99739c0941cf21827ea714399baa8 100644 (file)
@@ -70,13 +70,13 @@ union inotify_event_buffer {
 int inotify_add_watch_fd(int fd, int what, uint32_t mask);
 
 enum {
-        CHASE_PREFIX_ROOT = 1U << 0,   /* If set, the specified path will be prefixed by the specified root before beginning the iteration */
-        CHASE_NONEXISTENT = 1U << 1,   /* If set, it's OK if the path doesn't actually exist. */
-        CHASE_NO_AUTOFS   = 1U << 2,   /* If set, return -EREMOTE if autofs mount point found */
-        CHASE_SAFE        = 1U << 3,   /* If set, return EPERM if we ever traverse from unprivileged to privileged files or directories */
-        CHASE_OPEN        = 1U << 4,   /* If set, return an O_PATH object to the final component */
-        CHASE_TRAIL_SLASH = 1U << 5,   /* If set, any trailing slash will be preserved */
-        CHASE_STEP        = 1U << 6,   /* If set, just execute a single step of the normalization */
+        CHASE_PREFIX_ROOT = 1 << 0, /* If set, the specified path will be prefixed by the specified root before beginning the iteration */
+        CHASE_NONEXISTENT = 1 << 1, /* If set, it's OK if the path doesn't actually exist. */
+        CHASE_NO_AUTOFS   = 1 << 2, /* If set, return -EREMOTE if autofs mount point found */
+        CHASE_SAFE        = 1 << 3, /* If set, return EPERM if we ever traverse from unprivileged to privileged files or directories */
+        CHASE_OPEN        = 1 << 4, /* If set, return an O_PATH object to the final component */
+        CHASE_TRAIL_SLASH = 1 << 5, /* If set, any trailing slash will be preserved */
+        CHASE_STEP        = 1 << 6, /* If set, just execute a single step of the normalization */
 };
 
 /* How many iterations to execute before returning -ELOOP */
index d3368083b72aa2f6db8d19796a7a58daa7e51bb1..b8e5ae0c35bb4d35128b82fce38044e83c575350 100644 (file)
@@ -11,8 +11,8 @@
 #include <sys/types.h>
 
 typedef enum LabelFixFlags {
-        LABEL_IGNORE_ENOENT = 1U << 0,
-        LABEL_IGNORE_EROFS  = 1U << 1,
+        LABEL_IGNORE_ENOENT = 1 << 0,
+        LABEL_IGNORE_EROFS  = 1 << 1,
 } LabelFixFlags;
 
 int label_fix(const char *path, LabelFixFlags flags);
index ba6fea68914f3b9f6f3ed47dfcd424e70287e886..0f8865f1fb6fb47aec1f91d5f5ff872f585e13e2 100644 (file)
@@ -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);
index d4aa44129066e941c5b3ef14ace9cacda6a23f6e..d459333efccb39de210c3e59235f13c703d4f171 100644 (file)
@@ -4,9 +4,9 @@
 int update_reboot_parameter_and_warn(const char *parameter);
 
 typedef enum RebootFlags {
-        REBOOT_LOG      = 1U << 0,  /* log about what we are going to do and all errors */
-        REBOOT_DRY_RUN  = 1U << 1,  /* return 0 right before actually doing the reboot */
-        REBOOT_FALLBACK = 1U << 2,  /* fallback to plain reboot() if argument-based reboot doesn't work, isn't configured or doesn't apply otherwise */
+        REBOOT_LOG      = 1 << 0, /* log about what we are going to do and all errors */
+        REBOOT_DRY_RUN  = 1 << 1, /* return 0 right before actually doing the reboot */
+        REBOOT_FALLBACK = 1 << 2, /* fallback to plain reboot() if argument-based reboot doesn't work, isn't configured or doesn't apply otherwise */
 } RebootFlags;
 
 int reboot_with_parameter(RebootFlags flags);
index 798bab6c266bc94dfb49bdd3ef16f262beff2dff..98c6706a24c45a4eb3dfe6b56ebc90963c6d0e67 100644 (file)
@@ -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);
index ace94338e771cd52bb128558890b4596da3864ec..9ca68c9fe35e14f8ecfee4db65bf28db93c9a96e 100644 (file)
@@ -279,20 +279,20 @@ static inline bool exec_context_restrict_namespaces_set(const ExecContext *c) {
 }
 
 typedef enum ExecFlags {
-        EXEC_APPLY_SANDBOXING  = 1U << 0,
-        EXEC_APPLY_CHROOT      = 1U << 1,
-        EXEC_APPLY_TTY_STDIN   = 1U << 2,
-        EXEC_NEW_KEYRING       = 1U << 3,
-        EXEC_PASS_LOG_UNIT     = 1U << 4, /* Whether to pass the unit name to the service's journal stream connection */
-        EXEC_CHOWN_DIRECTORIES = 1U << 5, /* chown() the runtime/state/cache/log directories to the user we run as, under all conditions */
-        EXEC_NSS_BYPASS_BUS    = 1U << 6, /* Set the SYSTEMD_NSS_BYPASS_BUS environment variable, to disable nss-systemd for dbus */
-        EXEC_CGROUP_DELEGATE   = 1U << 7,
+        EXEC_APPLY_SANDBOXING  = 1 << 0,
+        EXEC_APPLY_CHROOT      = 1 << 1,
+        EXEC_APPLY_TTY_STDIN   = 1 << 2,
+        EXEC_NEW_KEYRING       = 1 << 3,
+        EXEC_PASS_LOG_UNIT     = 1 << 4, /* Whether to pass the unit name to the service's journal stream connection */
+        EXEC_CHOWN_DIRECTORIES = 1 << 5, /* chown() the runtime/state/cache/log directories to the user we run as, under all conditions */
+        EXEC_NSS_BYPASS_BUS    = 1 << 6, /* Set the SYSTEMD_NSS_BYPASS_BUS environment variable, to disable nss-systemd for dbus */
+        EXEC_CGROUP_DELEGATE   = 1 << 7,
 
         /* The following are not used by execute.c, but by consumers internally */
-        EXEC_PASS_FDS          = 1U << 8,
-        EXEC_IS_CONTROL        = 1U << 9,
-        EXEC_SETENV_RESULT     = 1U << 10,
-        EXEC_SET_WATCHDOG      = 1U << 11,
+        EXEC_PASS_FDS          = 1 << 8,
+        EXEC_IS_CONTROL        = 1 << 9,
+        EXEC_SETENV_RESULT     = 1 << 10,
+        EXEC_SET_WATCHDOG      = 1 << 11,
 } ExecFlags;
 
 struct ExecParameters {
index e9d69728fad22c49d756b098729417725d0980c0..aa7a71aa87737e10f397dde5ccb718001eb84ade 100644 (file)
 #include "virt.h"
 
 typedef enum MountMode {
-        MNT_NONE  =           0,
-        MNT_FATAL =           1 <<  0,
-        MNT_IN_CONTAINER =    1 <<  1,
-        MNT_CHECK_WRITABLE  = 1 <<  2,
+        MNT_NONE           = 0,
+        MNT_FATAL          = 1 << 0,
+        MNT_IN_CONTAINER   = 1 << 1,
+        MNT_CHECK_WRITABLE = 1 << 2,
 } MountMode;
 
 typedef struct MountPoint {
index cff3825ddc3721225821720f57923e059a810f86..24315fd12fe4a7c14a891d37021f0b83f9b32604 100644 (file)
@@ -86,7 +86,7 @@ typedef enum UnitDependencyMask {
         /* A dependency created because of data read from /proc/swaps and no other configuration source */
         UNIT_DEPENDENCY_PROC_SWAP          = 1 << 7,
 
-        _UNIT_DEPENDENCY_MASK_FULL = (1 << 8) - 1,
+        _UNIT_DEPENDENCY_MASK_FULL         = (1 << 8) - 1,
 } UnitDependencyMask;
 
 /* The Unit's dependencies[] hashmaps use this structure as value. It has the same size as a void pointer, and thus can
@@ -655,8 +655,8 @@ int unit_kill(Unit *u, KillWho w, int signo, sd_bus_error *error);
 int unit_kill_common(Unit *u, KillWho who, int signo, pid_t main_pid, pid_t control_pid, sd_bus_error *error);
 
 typedef enum UnitNotifyFlags {
-        UNIT_NOTIFY_RELOAD_FAILURE    = 1U << 0,
-        UNIT_NOTIFY_WILL_AUTO_RESTART = 1U << 1,
+        UNIT_NOTIFY_RELOAD_FAILURE    = 1 << 0,
+        UNIT_NOTIFY_WILL_AUTO_RESTART = 1 << 1,
 } UnitNotifyFlags;
 
 void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, UnitNotifyFlags flags);
index 074ef426a91016e28af6c91e5e4619d995c511e8..383d08e0fd1002691e1d20ffb7f1fc6e3200892c 100644 (file)
@@ -62,12 +62,12 @@ static bool arg_no_pager = false;
 static int arg_diff = -1;
 
 static enum {
-        SHOW_MASKED = 1 << 0,
+        SHOW_MASKED     = 1 << 0,
         SHOW_EQUIVALENT = 1 << 1,
         SHOW_REDIRECTED = 1 << 2,
         SHOW_OVERRIDDEN = 1 << 3,
-        SHOW_UNCHANGED = 1 << 4,
-        SHOW_EXTENDED = 1 << 5,
+        SHOW_UNCHANGED  = 1 << 4,
+        SHOW_EXTENDED   = 1 << 5,
 
         SHOW_DEFAULTS =
         (SHOW_MASKED | SHOW_EQUIVALENT | SHOW_REDIRECTED | SHOW_OVERRIDDEN | SHOW_EXTENDED)
index 154801425433a097adc2fd30d49a5bd5018614c2..49c312371b64e483c25b4c81fab44eac44240d59 100644 (file)
@@ -160,9 +160,9 @@ static int add_enumerated_to_set(
 
 enum {
         /* if set, add_subtree() works recursively */
-        CHILDREN_RECURSIVE              = (1U << 1),
+        CHILDREN_RECURSIVE      = 1 << 0,
         /* if set, add_subtree() scans object-manager hierarchies recursively */
-        CHILDREN_SUBHIERARCHIES         = (1U << 0),
+        CHILDREN_SUBHIERARCHIES = 1 << 1,
 };
 
 static int add_subtree_to_set(
index db7aadc28e9c1bf8860dbffb4a10417a8b6dffc1..6a34199b7dd423f041bd75c65e7b2dd3b023a42c 100644 (file)
 #include "volatile-util.h"
 
 typedef enum MountSettingsMask {
-        MOUNT_FATAL              = 1U << 0, /* if set, a mount error is considered fatal */
-        MOUNT_USE_USERNS         = 1U << 1, /* if set, mounts are patched considering uid/gid shifts in a user namespace */
-        MOUNT_IN_USERNS          = 1U << 2, /* if set, the mount is executed in the inner child, otherwise in the outer child */
-        MOUNT_APPLY_APIVFS_RO    = 1U << 3, /* if set, /proc/sys, and /sys will be mounted read-only, otherwise read-write. */
-        MOUNT_APPLY_APIVFS_NETNS = 1U << 4, /* if set, /proc/sys/net will be mounted read-write.
+        MOUNT_FATAL              = 1 << 0, /* if set, a mount error is considered fatal */
+        MOUNT_USE_USERNS         = 1 << 1, /* if set, mounts are patched considering uid/gid shifts in a user namespace */
+        MOUNT_IN_USERNS          = 1 << 2, /* if set, the mount is executed in the inner child, otherwise in the outer child */
+        MOUNT_APPLY_APIVFS_RO    = 1 << 3, /* if set, /proc/sys, and /sys will be mounted read-only, otherwise read-write. */
+        MOUNT_APPLY_APIVFS_NETNS = 1 << 4, /* if set, /proc/sys/net will be mounted read-write.
                                                Works only if MOUNT_APPLY_APIVFS_RO is also set. */
-        MOUNT_INACCESSIBLE_REG   = 1U << 5, /* if set, create an inaccessible regular file first and use as bind mount source */
+        MOUNT_INACCESSIBLE_REG   = 1 << 5, /* if set, create an inaccessible regular file first and use as bind mount source */
 } MountSettingsMask;
 
 typedef enum CustomMountType {
index a0959abb64fb3ce3d3597db574f6e83edfa2ed11..9fbf61265a054f184440c2d1a4bc506eb553313c 100644 (file)
@@ -18,9 +18,9 @@ typedef struct PortableMetadata {
 #define PORTABLE_METADATA_IS_UNIT(m) (!IN_SET((m)->name[0], 0, '/'))
 
 typedef enum PortableFlags {
-        PORTABLE_PREFER_COPY    = 1U << 0,
-        PORTABLE_PREFER_SYMLINK = 1U << 1,
-        PORTABLE_RUNTIME        = 1U << 2,
+        PORTABLE_PREFER_COPY    = 1 << 0,
+        PORTABLE_PREFER_SYMLINK = 1 << 1,
+        PORTABLE_RUNTIME        = 1 << 2,
 } PortableFlags;
 
 typedef enum PortableChangeType {
index 1556026b8ace905d685593ee0b8cfac83d7e9bc4..cba4541f648dc3064cdbf78556afe49f0a6dd803 100644 (file)
 #include "time-util.h"
 
 typedef enum AskPasswordFlags {
-        ASK_PASSWORD_ACCEPT_CACHED = 1U << 0,
-        ASK_PASSWORD_PUSH_CACHE    = 1U << 1,
-        ASK_PASSWORD_ECHO          = 1U << 2, /* show the password literally while reading, instead of "*" */
-        ASK_PASSWORD_SILENT        = 1U << 3, /* do no show any password at all while reading */
-        ASK_PASSWORD_NO_TTY        = 1U << 4,
-        ASK_PASSWORD_NO_AGENT      = 1U << 5,
-        ASK_PASSWORD_CONSOLE_COLOR = 1U << 6, /* Use color if /dev/console points to a console that supports color */
+        ASK_PASSWORD_ACCEPT_CACHED = 1 << 0,
+        ASK_PASSWORD_PUSH_CACHE    = 1 << 1,
+        ASK_PASSWORD_ECHO          = 1 << 2, /* show the password literally while reading, instead of "*" */
+        ASK_PASSWORD_SILENT        = 1 << 3, /* do no show any password at all while reading */
+        ASK_PASSWORD_NO_TTY        = 1 << 4,
+        ASK_PASSWORD_NO_AGENT      = 1 << 5,
+        ASK_PASSWORD_CONSOLE_COLOR = 1 << 6, /* Use color if /dev/console points to a console that supports color */
 } AskPasswordFlags;
 
 int ask_password_tty(int tty_fd, const char *message, const char *keyname, usec_t until, AskPasswordFlags flags, const char *flag_file, char **ret);
index ee9f1ff09705c8885ec45eebbe9fb7da9cd30453..7a9f2ea78b1711f81a576079feeaf239cbb3421f 100644 (file)
@@ -37,8 +37,8 @@ struct bus_properties_map {
 };
 
 enum {
-        BUS_MAP_STRDUP          = 1U << 0, /* If set, each "s" message is duplicated. Thus, each pointer needs to be freed. */
-        BUS_MAP_BOOLEAN_AS_BOOL = 1U << 1, /* If set, each "b" message is written to a bool pointer. If not set, "b" is written to a int pointer. */
+        BUS_MAP_STRDUP          = 1 << 0, /* If set, each "s" message is duplicated. Thus, each pointer needs to be freed. */
+        BUS_MAP_BOOLEAN_AS_BOOL = 1 << 1, /* If set, each "b" message is written to a bool pointer. If not set, "b" is written to a int pointer. */
 };
 
 int bus_map_id128(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_error *error, void *userdata);
index 8546d5ce6695c846ca9115349c5693e02d7c8306..3a13e6e71ea8ec97de588683fa1230838155d208 100644 (file)
 /* An abstract parser for simple, line based, shallow configuration files consisting of variable assignments only. */
 
 typedef enum ConfigParseFlags {
-        CONFIG_PARSE_RELAXED       = 1U << 0,
-        CONFIG_PARSE_ALLOW_INCLUDE = 1U << 1,
-        CONFIG_PARSE_WARN          = 1U << 2,
-        CONFIG_PARSE_REFUSE_BOM    = 1U << 3,
+        CONFIG_PARSE_RELAXED       = 1 << 0,
+        CONFIG_PARSE_ALLOW_INCLUDE = 1 << 1,
+        CONFIG_PARSE_WARN          = 1 << 2,
+        CONFIG_PARSE_REFUSE_BOM    = 1 << 3,
 } ConfigParseFlags;
 
 /* Argument list for parsers of specific configuration settings. */
index e715338ac59aa72affa8a4e0d555899792886d20..6f2b9db26c57a6c6608e937e161c1cfbe235b07e 100644 (file)
@@ -46,9 +46,9 @@
 #define UNIT_FILE_FOLLOW_SYMLINK_MAX 64
 
 typedef enum SearchFlags {
-        SEARCH_LOAD                   = 1U << 0,
-        SEARCH_FOLLOW_CONFIG_SYMLINKS = 1U << 1,
-        SEARCH_DROPIN                 = 1U << 2,
+        SEARCH_LOAD                   = 1 << 0,
+        SEARCH_FOLLOW_CONFIG_SYMLINKS = 1 << 1,
+        SEARCH_DROPIN                 = 1 << 2,
 } SearchFlags;
 
 typedef struct {
index 80f98d722e629c4c4bb0f9b69600de37b29dc0c4..be980b128e0e5101fb79f426c72f394bccebfc7c 100644 (file)
@@ -68,9 +68,9 @@ enum UnitFileChangeType {
 };
 
 enum UnitFileFlags {
-        UNIT_FILE_RUNTIME = 1U << 0,
-        UNIT_FILE_FORCE   = 1U << 1,
-        UNIT_FILE_DRY_RUN = 1U << 2,
+        UNIT_FILE_RUNTIME = 1 << 0,
+        UNIT_FILE_FORCE   = 1 << 1,
+        UNIT_FILE_DRY_RUN = 1 << 2,
 };
 
 /* type can either one of the UnitFileChangeTypes listed above, or a negative error.
index 357816fd08515fe695691565e2c95478c567cf43..3f1a19b3f19f1062f6d3ec2bb3c7a07b70ba948f 100644 (file)
@@ -15,9 +15,9 @@ typedef struct LookupPaths LookupPaths;
 #include "macro.h"
 
 typedef enum LookupPathsFlags {
-        LOOKUP_PATHS_EXCLUDE_GENERATED   = 1U << 0,
-        LOOKUP_PATHS_TEMPORARY_GENERATED = 1U << 1,
-        LOOKUP_PATHS_SPLIT_USR           = 1U << 2,
+        LOOKUP_PATHS_EXCLUDE_GENERATED   = 1 << 0,
+        LOOKUP_PATHS_TEMPORARY_GENERATED = 1 << 1,
+        LOOKUP_PATHS_SPLIT_USR           = 1 << 2,
 } LookupPathsFlags;
 
 struct LookupPaths {
index d35c44fa771bedd1b4629fe4c52213b2cc7aecc2..d6cb56de2c6975a85bfa75bd716f8af5371fc1e1 100644 (file)
@@ -69,10 +69,10 @@ int seccomp_load_syscall_filter_set(uint32_t default_action, const SyscallFilter
 int seccomp_load_syscall_filter_set_raw(uint32_t default_action, Hashmap* set, uint32_t action);
 
 typedef enum SeccompParseFlags {
-        SECCOMP_PARSE_INVERT     = 1U << 0,
-        SECCOMP_PARSE_WHITELIST  = 1U << 1,
-        SECCOMP_PARSE_LOG        = 1U << 2,
-        SECCOMP_PARSE_PERMISSIVE = 1U << 3,
+        SECCOMP_PARSE_INVERT     = 1 << 0,
+        SECCOMP_PARSE_WHITELIST  = 1 << 1,
+        SECCOMP_PARSE_LOG        = 1 << 2,
+        SECCOMP_PARSE_PERMISSIVE = 1 << 3,
 } SeccompParseFlags;
 
 int seccomp_parse_syscall_filter_full(