chiark / gitweb /
update TODO
[elogind.git] / src / delta / delta.c
index cc3420829ae2d1e9615606cd6ca52b7a0d135c88..aec3dc899505cad7a78c33ca9c26d9e9419f9060 100644 (file)
@@ -312,17 +312,17 @@ static int parse_flags(const char *flag_str, int flags) {
         size_t l;
 
         FOREACH_WORD(w, l, flag_str, state) {
-                if (strncmp("masked", w, l) == 0)
+                if (strneq("masked", w, l))
                         flags |= SHOW_MASKED;
-                else if (strncmp ("equivalent", w, l) == 0)
+                else if (strneq ("equivalent", w, l))
                         flags |= SHOW_EQUIVALENT;
-                else if (strncmp("redirected", w, l) == 0)
+                else if (strneq("redirected", w, l))
                         flags |= SHOW_REDIRECTED;
-                else if (strncmp("overridden", w, l) == 0)
+                else if (strneq("overridden", w, l))
                         flags |= SHOW_OVERRIDDEN;
-                else if (strncmp("unchanged", w, l) == 0)
+                else if (strneq("unchanged", w, l))
                         flags |= SHOW_UNCHANGED;
-                else if (strncmp("default", w, l) == 0)
+                else if (strneq("default", w, l))
                         flags |= SHOW_DEFAULTS;
                 else
                         return -EINVAL;
@@ -352,7 +352,7 @@ static int parse_argv(int argc, char *argv[]) {
         assert(argc >= 1);
         assert(argv);
 
-        while ((c = getopt_long(argc, argv, "h", options, NULL)) >= 0) {
+        while ((c = getopt_long(argc, argv, "ht:", options, NULL)) >= 0) {
 
                 switch (c) {
 
@@ -362,7 +362,6 @@ static int parse_argv(int argc, char *argv[]) {
 
                 case ARG_VERSION:
                         puts(PACKAGE_STRING);
-                        puts(DISTRIBUTION);
                         puts(SYSTEMD_FEATURES);
                         return 0;
 
@@ -455,7 +454,7 @@ int main(int argc, char *argv[]) {
                 arg_flags |= SHOW_OVERRIDDEN;
 
         if (!arg_no_pager)
-                pager_open();
+                pager_open(false);
 
         if (optind < argc) {
                 int i;