]> granicus.if.org Git - sysstat/commitdiff
Make sar's -I option work again with sadf
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 18 Dec 2016 13:40:22 +0000 (14:40 +0100)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sun, 18 Dec 2016 13:40:22 +0000 (14:40 +0100)
Because of commit e530472, sar's -I option could no longer be used with
sadf (e.g., sadf -- -I SUM). This patch fixes the problem.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
sadf.c

diff --git a/sadf.c b/sadf.c
index 92655cefbb033b5358c173a2cee32a08a721adea..fea935c978e2f75ef5fd637f0902902147966948 100644 (file)
--- a/sadf.c
+++ b/sadf.c
@@ -1450,7 +1450,7 @@ int main(int argc, char **argv)
        while (opt < argc) {
 
                if (!strcmp(argv[opt], "-I")) {
-                       if (argv[++opt] && sar_options) {
+                       if (sar_options) {
                                if (parse_sar_I_opt(argv, &opt, act)) {
                                        usage(argv[0]);
                                }