- fprintf(stderr, "Invalid power mode value, must be between %x and %x\n", AM7XXX_POWER_OFF, AM7XXX_POWER_TURBO);
- exit(EXIT_FAILURE);
+ fprintf(stderr, "Invalid power mode value, must be between %d and %d\n",
+ AM7XXX_POWER_OFF, AM7XXX_POWER_TURBO);
+ ret = -EINVAL;
+ goto out;
+ }
+ break;
+ case 'z':
+ zoom = atoi(optarg);
+ switch(zoom) {
+ case AM7XXX_ZOOM_ORIGINAL:
+ case AM7XXX_ZOOM_H:
+ case AM7XXX_ZOOM_H_V:
+ case AM7XXX_ZOOM_TEST:
+ fprintf(stdout, "Zoom: %d\n", zoom);
+ break;
+ default:
+ fprintf(stderr, "Invalid zoom mode value, must be between %d and %d\n",
+ AM7XXX_ZOOM_ORIGINAL, AM7XXX_ZOOM_TEST);
+ ret = -EINVAL;
+ goto out;