tests: Move to kernel style SPDX license identifiers
[lttng-tools.git] / tests / utils / testapp / gen-ust-nevents-str / gen-ust-nevents-str.c
index 6d90bfc66524c49cf961e7e624538d0e53905cbc..d68501bee553406e00b2cb8f78a673a231493067 100644 (file)
@@ -1,31 +1,24 @@
 /*
- * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
+ * Copyright (C) 2017 Philippe Proulx <pproulx@efficios.com>
  *
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation; version 2.1 of the License.
+ * SPDX-License-Identifier: LGPL-2.1-only
  *
- * This library is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301 USA
  */
 
 #define _LGPL_SOURCE
 #include <stdio.h>
+#include "signal-helper.h"
 
 #define TRACEPOINT_DEFINE
 #include "tp.h"
 
 int main(int argc, char **argv)
 {
-       int count;
-       int i;
-       int arg_i;
+       int count = 0, i = 0, arg_i = 0;
+
+       if (set_signal_handler()) {
+               return 1;
+       }
 
        if (argc <= 3) {
                fprintf(stderr, "Usage: %s COUNT STRING [STRING]...\n",
@@ -48,6 +41,9 @@ int main(int argc, char **argv)
                if (arg_i == argc) {
                        arg_i = 2;
                }
+               if (should_quit) {
+                       break;
+               }
        }
 
        return 0;
This page took 0.025897 seconds and 5 git commands to generate.