|
@@ -219,8 +219,10 @@ bool parse_command(struct videohub_data *data, char *cmd) {
|
219
|
219
|
break;
|
220
|
220
|
|
221
|
221
|
case CMD_VIDEOHUB_DEVICE:
|
222
|
|
- if ((p = parse_text(line, "Device present: ")))
|
|
222
|
+ if ((p = parse_text(line, "Device present: "))) {
|
223
|
223
|
data->device.dev_present = streq(p, "true");
|
|
224
|
+ data->device.needs_fw_update = streq(p, "needs_update");
|
|
225
|
+ }
|
224
|
226
|
|
225
|
227
|
if ((p = parse_text(line, "Model name: ")))
|
226
|
228
|
snprintf(data->device.model_name, sizeof(data->device.model_name), "%s", p);
|
|
@@ -289,6 +291,9 @@ bool parse_command(struct videohub_data *data, char *cmd) {
|
289
|
291
|
switch (v->cmd) {
|
290
|
292
|
case CMD_VIDEOHUB_DEVICE:
|
291
|
293
|
if (!data->device.dev_present) {
|
|
294
|
+ if (data->device.needs_fw_update) {
|
|
295
|
+ die("Device reports that it needs firmware update.");
|
|
296
|
+ }
|
292
|
297
|
die("Device reports that it's not present.");
|
293
|
298
|
}
|
294
|
299
|
if (data->device.num_video_inputs > ARRAY_SIZE(data->inputs)) {
|