Changeset 1abcf1d in mainline for uspace/app/tmon


Ignore:
Timestamp:
2018-04-10T19:43:21Z (8 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a69d42e
Parents:
9fa14d8d
Message:

puts() should append newline.

Location:
uspace/app/tmon
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tmon/main.c

    r9fa14d8d r1abcf1d  
    127127static void print_usage(char *app_name)
    128128{
    129         puts(NAME ": benchmark USB diagnostic device\n\n");
     129        puts(NAME ": benchmark USB diagnostic device\n");
    130130        printf("Usage: %s command [device] [options]\n\n", app_name);
    131131
     
    134134        }
    135135
    136         puts("\n");
     136        puts("");
    137137        for (unsigned i = 0; i < ARRAY_SIZE(options); ++i) {
    138138                printf(INDENT "-%c --%s\n" INDENT INDENT "%s\n", options[i].short_name, options[i].long_name, options[i].description);
    139139        }
    140140
    141         puts("\nIf no device is specified, the first device is used provided that it is the only one connected. Otherwise, the command fails.\n\n");
     141        puts("\nIf no device is specified, the first device is used provided that it is the only one connected. Otherwise, the command fails.\n");
    142142}
    143143
  • uspace/app/tmon/tests.c

    r9fa14d8d r1abcf1d  
    9494                case 't':
    9595                        if (!optarg || str_uint32_t(optarg, NULL, 10, false, &duration_uint) != EOK) {
    96                                 puts(NAME ": Invalid duration.\n");
     96                                puts(NAME ": Invalid duration.");
    9797                                rc = EINVAL;
    9898                                goto err_malloc;
     
    102102                case 's':
    103103                        if (!optarg || str_size_t(optarg, NULL, 10, false, &p->transfer_size) != EOK) {
    104                                 puts(NAME ": Invalid data size.\n");
     104                                puts(NAME ": Invalid data size.");
    105105                                rc = EINVAL;
    106106                                goto err_malloc;
     
    182182        const usbdiag_test_params_t *params = (usbdiag_test_params_t *) generic_params;
    183183        print_params(params);
    184         puts("\nTesting... ");
     184        fputs("\nTesting... ", stdout);
    185185
    186186        usbdiag_test_results_t results;
    187187        errno_t rc = usbdiag_test_in(exch, params, &results);
    188188        if (rc != EOK) {
    189                 puts("failed\n");
     189                puts("failed");
    190190                printf(NAME ": %s\n", str_error(rc));
    191191                return 1;
    192192        }
    193193
    194         puts("succeeded\n\n");
     194        puts("succeeded\n");
    195195        print_results(params, &results);
    196196        return 0;
     
    207207        const usbdiag_test_params_t *params = (usbdiag_test_params_t *) generic_params;
    208208        print_params(params);
    209         puts("\nTesting... ");
     209        fputs("\nTesting... ", stdout);
    210210
    211211        usbdiag_test_results_t results;
    212212        errno_t rc = usbdiag_test_out(exch, params, &results);
    213213        if (rc) {
    214                 puts("failed\n");
     214                puts("failed");
    215215                printf(NAME ": %s\n", str_error(rc));
    216216                return 1;
    217217        }
    218218
    219         puts("succeeded\n\n");
     219        puts("succeeded\n");
    220220        print_results(params, &results);
    221221        return 0;
Note: See TracChangeset for help on using the changeset viewer.