Browse Source

In test mode print device info after commands are executed.

Georgi Chorbadzhiyski 9 years ago
parent
commit
a4275361ae
1 changed files with 11 additions and 4 deletions
  1. 11
    4
      videohubctrl.c

+ 11
- 4
videohubctrl.c View File

227
 			p->num, ARRAY_SIZE(p->port));
227
 			p->num, ARRAY_SIZE(p->port));
228
 }
228
 }
229
 
229
 
230
+static void print_device_full(struct videohub_data *d) {
231
+	print_device_info(d);
232
+	print_device_video_inputs(d);
233
+	print_device_video_outputs(d);
234
+	fflush(stdout);
235
+}
236
+
230
 static int read_device_command_stream(struct videohub_data *d) {
237
 static int read_device_command_stream(struct videohub_data *d) {
231
 	int ret, ncommands = 0;
238
 	int ret, ncommands = 0;
232
 	char buf[8192 + 1];
239
 	char buf[8192 + 1];
302
 				read_device_command_stream(data);
309
 				read_device_command_stream(data);
303
 			}
310
 			}
304
 		}
311
 		}
312
+		// Show the result after commands
313
+		if (test_data)
314
+			print_device_full(data);
305
 	} else if (show_monitor) {
315
 	} else if (show_monitor) {
306
 		while (1) {
316
 		while (1) {
307
 			int sleeps = 0;
317
 			int sleeps = 0;
327
 	} else if (show_backup) {
337
 	} else if (show_backup) {
328
 		print_device_backup(data);
338
 		print_device_backup(data);
329
 	} else if (show_info) {
339
 	} else if (show_info) {
330
-		print_device_info(data);
331
-		print_device_video_inputs(data);
332
-		print_device_video_outputs(data);
333
-		fflush(stdout);
340
+		print_device_full(data);
334
 	}
341
 	}
335
 
342
 
336
 	shutdown_fd(&data->dev_fd);
343
 	shutdown_fd(&data->dev_fd);

Loading…
Cancel
Save