mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
use hard coded names for usage info
This commit is contained in:
parent
d4e6204e8e
commit
9813d2a6c2
5 changed files with 22 additions and 22 deletions
10
src/fpga.c
10
src/fpga.c
|
@ -31,9 +31,9 @@ int fpga_tests(int argc, char *argv[], struct fpga *f);
|
|||
|
||||
struct settings settings;
|
||||
|
||||
void usage(char *name)
|
||||
void usage()
|
||||
{
|
||||
printf("Usage: %s CONFIGFILE CMD [OPTIONS]\n", name);
|
||||
printf("Usage: villas-fpga CONFIGFILE CMD [OPTIONS]\n");
|
||||
printf(" Commands:\n");
|
||||
printf(" tests Test functionality of VILLASfpga card\n");
|
||||
printf(" benchmarks Do benchmarks\n\n");
|
||||
|
@ -57,13 +57,13 @@ int main(int argc, char *argv[])
|
|||
} subcommand;
|
||||
|
||||
if (argc < 3)
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
if (strcmp(argv[2], "tests") == 0)
|
||||
subcommand = FPGA_TESTS;
|
||||
else if (strcmp(argv[2], "benchmarks") == 0)
|
||||
subcommand = FPGA_BENCH;
|
||||
else
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
|
||||
/* Parse arguments */
|
||||
char c, *endptr;
|
||||
|
@ -75,7 +75,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
case '?':
|
||||
default:
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -71,9 +71,9 @@ static void signals_init()
|
|||
sigaction(SIGTERM, &sa_quit, NULL);
|
||||
}
|
||||
|
||||
static void usage(const char *name)
|
||||
static void usage()
|
||||
{
|
||||
printf("Usage: %s CONFIG\n", name);
|
||||
printf("Usage: villas-node CONFIG\n");
|
||||
printf(" CONFIG is a required path to a configuration file\n\n");
|
||||
#ifdef ENABLE_OPAL_ASYNC
|
||||
printf("Usage: %s OPAL_ASYNC_SHMEM_NAME OPAL_ASYNC_SHMEM_SIZE OPAL_PRINT_SHMEM_NAME\n", name);
|
||||
|
@ -103,7 +103,7 @@ int main(int argc, char *argv[])
|
|||
#else
|
||||
if (argc != 2)
|
||||
#endif
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
|
||||
char *configfile = (argc == 2) ? argv[1] : "opal-shmem.conf";
|
||||
|
||||
|
|
12
src/pipe.c
12
src/pipe.c
|
@ -69,9 +69,9 @@ static void quit(int signal, siginfo_t *sinfo, void *ctx)
|
|||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
static void usage(char *name)
|
||||
static void usage()
|
||||
{
|
||||
printf("Usage: %s CONFIG NODE [OPTIONS]\n", name);
|
||||
printf("Usage: villas-pipe CONFIG NODE [OPTIONS]\n");
|
||||
printf(" CONFIG path to a configuration file\n");
|
||||
printf(" NODE the name of the node to which samples are sent and received from\n");
|
||||
printf(" OPTIONS are:\n");
|
||||
|
@ -100,7 +100,7 @@ static void * send_loop(void *ctx)
|
|||
if (ret < 0)
|
||||
error("Failed to allocate memory for receive pool.");
|
||||
|
||||
ret = sample_get_many(&sendd.pool, smps, node->vectorize);
|
||||
ret = sample_alloc(&sendd.pool, smps, node->vectorize);
|
||||
if (ret < 0)
|
||||
error("Failed to get %u samples out of send pool (%d).", node->vectorize, ret);
|
||||
|
||||
|
@ -144,7 +144,7 @@ static void * recv_loop(void *ctx)
|
|||
if (ret < 0)
|
||||
error("Failed to allocate memory for receive pool.");
|
||||
|
||||
ret = sample_get_many(&recvv.pool, smps, node->vectorize);
|
||||
ret = sample_alloc(&recvv.pool, smps, node->vectorize);
|
||||
if (ret < 0)
|
||||
error("Failed to get %u samples out of receive pool (%d).", node->vectorize, ret);
|
||||
|
||||
|
@ -180,7 +180,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
/* Parse command line arguments */
|
||||
if (argc < 3)
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
|
||||
/* Default values */
|
||||
sendd.enabled = true;
|
||||
|
@ -202,7 +202,7 @@ int main(int argc, char *argv[])
|
|||
break;
|
||||
case 'h':
|
||||
case '?':
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -30,9 +30,9 @@ enum SIGNAL_TYPE {
|
|||
TYPE_MIXED
|
||||
};
|
||||
|
||||
void usage(char *name)
|
||||
void usage()
|
||||
{
|
||||
printf("Usage: %s SIGNAL [OPTIONS]\n", name);
|
||||
printf("Usage: villas-signal SIGNAL [OPTIONS]\n");
|
||||
printf(" SIGNAL is on of: 'mixed', 'random', 'sine', 'triangle', 'square', 'ramp'\n");
|
||||
printf(" -v NUM specifies how many values a message should contain\n");
|
||||
printf(" -r HZ how many messages per second\n");
|
||||
|
@ -59,7 +59,7 @@ int main(int argc, char *argv[])
|
|||
log_init();
|
||||
|
||||
if (argc < 2) {
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -101,7 +101,7 @@ int main(int argc, char *argv[])
|
|||
goto check;
|
||||
case 'h':
|
||||
case '?':
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
}
|
||||
|
||||
continue;
|
||||
|
|
|
@ -53,9 +53,9 @@ void quit()
|
|||
running = 0;
|
||||
}
|
||||
|
||||
void usage(char *name)
|
||||
void usage()
|
||||
{
|
||||
printf("Usage: %s CONFIG TEST NODE [ARGS]\n", name);
|
||||
printf("Usage: villas-test CONFIG TEST NODE [ARGS]\n");
|
||||
printf(" CONFIG path to a configuration file\n");
|
||||
printf(" TEST the name of the test to execute: 'rtt'\n");
|
||||
printf(" NODE name of the node which shoud be used\n\n");
|
||||
|
@ -68,7 +68,7 @@ int main(int argc, char *argv[])
|
|||
config_t config;
|
||||
|
||||
if (argc < 4) {
|
||||
usage(argv[0]);
|
||||
usage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ void test_rtt() {
|
|||
struct stat st;
|
||||
if (!fstat(fd, &st)) {
|
||||
FILE *f = fdopen(fd, "w");
|
||||
hist_matlab(&hist, f);
|
||||
hist_dump_matlab(&hist, f);
|
||||
}
|
||||
else
|
||||
error("Invalid file descriptor: %u", fd);
|
||||
|
|
Loading…
Add table
Reference in a new issue