Changeset 1abcf1d in mainline for uspace/app/tmon
- Timestamp:
- 2018-04-10T19:43:21Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a69d42e
- Parents:
- 9fa14d8d
- Location:
- uspace/app/tmon
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tmon/main.c
r9fa14d8d r1abcf1d 127 127 static void print_usage(char *app_name) 128 128 { 129 puts(NAME ": benchmark USB diagnostic device\n \n");129 puts(NAME ": benchmark USB diagnostic device\n"); 130 130 printf("Usage: %s command [device] [options]\n\n", app_name); 131 131 … … 134 134 } 135 135 136 puts(" \n");136 puts(""); 137 137 for (unsigned i = 0; i < ARRAY_SIZE(options); ++i) { 138 138 printf(INDENT "-%c --%s\n" INDENT INDENT "%s\n", options[i].short_name, options[i].long_name, options[i].description); 139 139 } 140 140 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"); 142 142 } 143 143 -
uspace/app/tmon/tests.c
r9fa14d8d r1abcf1d 94 94 case 't': 95 95 if (!optarg || str_uint32_t(optarg, NULL, 10, false, &duration_uint) != EOK) { 96 puts(NAME ": Invalid duration. \n");96 puts(NAME ": Invalid duration."); 97 97 rc = EINVAL; 98 98 goto err_malloc; … … 102 102 case 's': 103 103 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."); 105 105 rc = EINVAL; 106 106 goto err_malloc; … … 182 182 const usbdiag_test_params_t *params = (usbdiag_test_params_t *) generic_params; 183 183 print_params(params); 184 puts("\nTesting... ");184 fputs("\nTesting... ", stdout); 185 185 186 186 usbdiag_test_results_t results; 187 187 errno_t rc = usbdiag_test_in(exch, params, &results); 188 188 if (rc != EOK) { 189 puts("failed \n");189 puts("failed"); 190 190 printf(NAME ": %s\n", str_error(rc)); 191 191 return 1; 192 192 } 193 193 194 puts("succeeded\n \n");194 puts("succeeded\n"); 195 195 print_results(params, &results); 196 196 return 0; … … 207 207 const usbdiag_test_params_t *params = (usbdiag_test_params_t *) generic_params; 208 208 print_params(params); 209 puts("\nTesting... ");209 fputs("\nTesting... ", stdout); 210 210 211 211 usbdiag_test_results_t results; 212 212 errno_t rc = usbdiag_test_out(exch, params, &results); 213 213 if (rc) { 214 puts("failed \n");214 puts("failed"); 215 215 printf(NAME ": %s\n", str_error(rc)); 216 216 return 1; 217 217 } 218 218 219 puts("succeeded\n \n");219 puts("succeeded\n"); 220 220 print_results(params, &results); 221 221 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.