diff options
author | Ben Pfaff <blp@nicira.com> | 2011-01-28 12:39:15 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-02-07 12:50:19 -0800 |
commit | 8274ae959ac0b158c3e3206b3810af608fb93785 (patch) | |
tree | 124a8644950a1b2ba571d157244b98d6ebf810df /lib/daemon.h | |
parent | 0a6f55420508c31af9fe41aafdd26ce8462cc1be (diff) |
daemon: Define daemon options enums the same way as other option enums.
Other modules that accept options use this style and I don't see a reason
for the daemon code to be different. The style used by the daemon code
until now runs the risk of ending up with conflicting values accidentally,
which would be confusing.
Diffstat (limited to 'lib/daemon.h')
-rw-r--r-- | lib/daemon.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/daemon.h b/lib/daemon.h index 1d630768..dd85b463 100644 --- a/lib/daemon.h +++ b/lib/daemon.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2008, 2009, 2010 Nicira Networks. + * Copyright (c) 2008, 2009, 2010, 2011 Nicira Networks. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,13 +21,12 @@ #include <stdbool.h> #include <sys/types.h> -enum { - OPT_DETACH = UCHAR_MAX + 2048, - OPT_NO_CHDIR, - OPT_OVERWRITE_PIDFILE, - OPT_PIDFILE, +#define DAEMON_OPTION_ENUMS \ + OPT_DETACH, \ + OPT_NO_CHDIR, \ + OPT_OVERWRITE_PIDFILE, \ + OPT_PIDFILE, \ OPT_MONITOR -}; #define DAEMON_LONG_OPTIONS \ {"detach", no_argument, 0, OPT_DETACH}, \ |