Print this page
11462 enable smatch by default
*** 11,20 ****
--- 11,22 ----
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, see http://www.gnu.org/copyleft/gpl.txt
+ *
+ * Copyright 2019 Joyent, Inc.
*/
#include <stdio.h>
#include <unistd.h>
#include <libgen.h>
*** 41,50 ****
--- 43,53 ----
int option_time;
int option_mem;
char *option_datadir_str;
int option_fatal_checks;
int option_succeed;
+ int option_timeout = 60;
FILE *sm_outfd;
FILE *sql_outfd;
FILE *caller_info_fd;
*** 171,181 ****
free(str);
return ret;
}
#define OPTION(_x) do { \
! if (match_option((*argvp)[1], #_x)) { \
option_##_x = 1; \
} \
} while (0)
void parse_args(int *argcp, char ***argvp)
--- 174,184 ----
free(str);
return ret;
}
#define OPTION(_x) do { \
! if (match_option((*argvp)[i], #_x)) { \
option_##_x = 1; \
} \
} while (0)
void parse_args(int *argcp, char ***argvp)
*** 216,225 ****
--- 219,234 ----
enable_disable_checks((*argvp)[i] + 10, 0);
option_enable = 1;
option_disable = 1;
}
+ if (!strncmp((*argvp)[i], "--timeout=", 10)) {
+ if (sscanf((*argvp)[i] + 10, "%d",
+ &option_timeout) != 1)
+ sm_fatal("invalid option %s", (*argvp)[i]);
+ }
+
OPTION(fatal_checks);
OPTION(spammy);
OPTION(info);
OPTION(debug);
OPTION(debug_implied);