Changeset 102
- Timestamp:
- 05/16/05 11:38:47 (19 years ago)
- Files:
-
- trunk/freebob/tests/stream_format.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/freebob/tests/stream_format.cpp
r100 r102 197 197 {"test", 't', 0, 0, "Do tests instead get/set action" }, 198 198 {"frequency", 'f', "FREQUENCY", 0, "Set frequency" }, 199 { 0 } 199 {"port", 'p', "PORT", 0, "Set port" }, 200 { 0 } 200 201 }; 201 202 … … 206 207 , test( false ) 207 208 , frequency( 0 ) 209 , port( 0 ) 208 210 { 209 211 args[0] = 0; … … 215 217 bool test; 216 218 int frequency; 219 int port; 217 220 } arguments; 218 221 … … 236 239 errno = 0; 237 240 arguments->frequency = strtol(arg, &tail, 0); 241 if (errno) { 242 perror("argument parsing failed:"); 243 return errno; 244 } 245 case 'p': 246 errno = 0; 247 arguments->port = strtol(arg, &tail, 0); 238 248 if (errno) { 239 249 perror("argument parsing failed:"); … … 1589 1599 } 1590 1600 1591 if (raw1394_set_port(handle, 0) < 0) {1601 if (raw1394_set_port(handle, arguments.port) < 0) { 1592 1602 fprintf(stderr, "Could not set port"); 1593 1603 raw1394_destroy_handle (handle);