Browse Source

Check if we are talking to Videohub device.

Georgi Chorbadzhiyski 9 years ago
parent
commit
d05509dbd9
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      videohubctrl.c

+ 2
- 0
videohubctrl.c View File

@@ -107,6 +107,8 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
107 107
 }
108 108
 
109 109
 static void print_device_desc(struct device_desc *d) {
110
+	if (!strlen(d->protocol_ver) || !strlen(d->model_name))
111
+		die("The device does not return protocol version and model name!");
110 112
 	printf("\n");
111 113
 	printf("Protocol version: %s\n", d->protocol_ver);
112 114
 	printf("Model name: %s\n", d->model_name);

Loading…
Cancel
Save