@ -355,6 +355,7 @@ int main(int argc, char **argv)
# endif
# endif
int dump_config = 0 ;
int dump_config = 0 ;
int list_unittests = 0 ;
int list_unittests = 0 ;
int list_cuda_cards = 0 ;
int daemon = 0 ;
int daemon = 0 ;
char * user_name = NULL ;
char * user_name = NULL ;
char * group_name = NULL ;
char * group_name = NULL ;
@ -412,6 +413,7 @@ int main(int argc, char **argv)
{ " pcap-buffer-size " , required_argument , 0 , 0 } ,
{ " pcap-buffer-size " , required_argument , 0 , 0 } ,
{ " unittest-filter " , required_argument , 0 , ' U ' } ,
{ " unittest-filter " , required_argument , 0 , ' U ' } ,
{ " list-unittests " , 0 , & list_unittests , 1 } ,
{ " list-unittests " , 0 , & list_unittests , 1 } ,
{ " list-cuda-cards " , 0 , & list_cuda_cards , 1 } ,
# ifdef OS_WIN32
# ifdef OS_WIN32
{ " service-install " , 0 , 0 , 0 } ,
{ " service-install " , 0 , 0 , 0 } ,
{ " service-remove " , 0 , 0 , 0 } ,
{ " service-remove " , 0 , 0 , 0 } ,
@ -482,6 +484,12 @@ int main(int argc, char **argv)
# else
# else
fprintf ( stderr , " ERROR: Unit tests not enabled. Make sure to pass --enable-unittests to configure when building. \n " ) ;
fprintf ( stderr , " ERROR: Unit tests not enabled. Make sure to pass --enable-unittests to configure when building. \n " ) ;
exit ( EXIT_FAILURE ) ;
exit ( EXIT_FAILURE ) ;
# endif /* UNITTESTS */
} else if ( strcmp ( ( long_opts [ option_index ] ) . name , " list-cuda-cards " ) = = 0 ) {
# ifndef __SC_CUDA_SUPPORT__
fprintf ( stderr , " ERROR: Cuda not enabled. Make sure to pass "
" --enable-cuda to configure when building. \n " ) ;
exit ( EXIT_FAILURE ) ;
# endif /* UNITTESTS */
# endif /* UNITTESTS */
}
}
# ifdef OS_WIN32
# ifdef OS_WIN32
@ -690,6 +698,10 @@ int main(int argc, char **argv)
# ifdef __SC_CUDA_SUPPORT__
# ifdef __SC_CUDA_SUPPORT__
/* Init the CUDA environment */
/* Init the CUDA environment */
SCCudaInitCudaEnvironment ( ) ;
SCCudaInitCudaEnvironment ( ) ;
if ( list_cuda_cards ) {
SCCudaListCards ( ) ;
exit ( EXIT_SUCCESS ) ;
}
# endif
# endif
if ( ! CheckValidDaemonModes ( daemon , run_mode ) ) {
if ( ! CheckValidDaemonModes ( daemon , run_mode ) ) {