From: Uwe Hermann Date: Sun, 20 Jan 2013 17:48:02 +0000 (+0100) Subject: Remove non-error hw_info_get() messages. X-Git-Tag: dsupstream~344 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=4ebd48b352a28add68d54d509b291688e1df601b;p=libsigrok.git Remove non-error hw_info_get() messages. Currently hw_info_get() can receive requests for entries (info_id) that the specific driver doesn't support. That is (right now) a valid use-case and not an error (might change later, though). Thus, for now, don't output messages for such requests at all (certainly not as sr_err() where they show up in e.g. sigrok-cli output per default). --- diff --git a/hardware/agilent-dmm/api.c b/hardware/agilent-dmm/api.c index 31c2fe11..167d4cc8 100644 --- a/hardware/agilent-dmm/api.c +++ b/hardware/agilent-dmm/api.c @@ -250,7 +250,6 @@ static int hw_cleanup(void) static int hw_info_get(int info_id, const void **data, const struct sr_dev_inst *sdi) { - (void)sdi; switch (info_id) { diff --git a/hardware/alsa/api.c b/hardware/alsa/api.c index 4591fee4..57313461 100644 --- a/hardware/alsa/api.c +++ b/hardware/alsa/api.c @@ -163,7 +163,6 @@ static int hw_info_get(int info_id, const void **data, *data = &devc->supp_rates; break; default: - sr_err("Invalid info_id: %d.", info_id); return SR_ERR_ARG; } diff --git a/hardware/colead-slm/api.c b/hardware/colead-slm/api.c index 62779385..3135a5f3 100644 --- a/hardware/colead-slm/api.c +++ b/hardware/colead-slm/api.c @@ -194,7 +194,6 @@ static int hw_cleanup(void) static int hw_info_get(int info_id, const void **data, const struct sr_dev_inst *sdi) { - (void)sdi; switch (info_id) { diff --git a/hardware/fluke-dmm/api.c b/hardware/fluke-dmm/api.c index 93869a48..a7272ad9 100644 --- a/hardware/fluke-dmm/api.c +++ b/hardware/fluke-dmm/api.c @@ -284,7 +284,6 @@ static int hw_cleanup(void) static int hw_info_get(int info_id, const void **data, const struct sr_dev_inst *sdi) { - (void)sdi; switch (info_id) { diff --git a/hardware/lascar-el-usb/api.c b/hardware/lascar-el-usb/api.c index 210480cc..e9875705 100644 --- a/hardware/lascar-el-usb/api.c +++ b/hardware/lascar-el-usb/api.c @@ -216,7 +216,6 @@ static int hw_cleanup(void) static int hw_info_get(int info_id, const void **data, const struct sr_dev_inst *sdi) { - (void)sdi; switch (info_id) { @@ -227,7 +226,6 @@ static int hw_info_get(int info_id, const void **data, *data = hwcaps; break; default: - sr_err("Unknown info_id: %d.", info_id); return SR_ERR_ARG; } diff --git a/hardware/nexus-osciprime/api.c b/hardware/nexus-osciprime/api.c index 8624b841..bb631be2 100644 --- a/hardware/nexus-osciprime/api.c +++ b/hardware/nexus-osciprime/api.c @@ -268,14 +268,12 @@ static int hw_cleanup(void) static int hw_info_get(int info_id, const void **data, const struct sr_dev_inst *sdi) { - /* TODO */ (void)data; (void)sdi; switch (info_id) { default: - sr_err("Unknown info_id: %d.", info_id); return SR_ERR_ARG; } diff --git a/hardware/rigol-ds1xx2/api.c b/hardware/rigol-ds1xx2/api.c index 1590f060..64f8c222 100644 --- a/hardware/rigol-ds1xx2/api.c +++ b/hardware/rigol-ds1xx2/api.c @@ -347,7 +347,6 @@ static int hw_info_get(int info_id, const void **data, *data = coupling; break; default: - sr_err("Unknown info_id: %d.", info_id); return SR_ERR_ARG; } diff --git a/hardware/tondaj-sl-814/api.c b/hardware/tondaj-sl-814/api.c index 28e9bc85..5b7ed363 100644 --- a/hardware/tondaj-sl-814/api.c +++ b/hardware/tondaj-sl-814/api.c @@ -208,7 +208,6 @@ static int hw_info_get(int info_id, const void **data, *data = hwcaps; break; default: - sr_err("Unknown info_id: %d.", info_id); return SR_ERR_ARG; } diff --git a/hardware/uni-t-dmm/api.c b/hardware/uni-t-dmm/api.c index e0d36661..d618ef44 100644 --- a/hardware/uni-t-dmm/api.c +++ b/hardware/uni-t-dmm/api.c @@ -186,7 +186,6 @@ static int hw_info_get(int info_id, const void **data, return SR_ERR_ARG; break; default: - sr_err("%s: Unknown info_id %d.", __func__, info_id); return SR_ERR_ARG; break; } diff --git a/hardware/victor-dmm/api.c b/hardware/victor-dmm/api.c index 496b51b7..23c12e9d 100644 --- a/hardware/victor-dmm/api.c +++ b/hardware/victor-dmm/api.c @@ -254,7 +254,6 @@ static int hw_info_get(int info_id, const void **data, *data = hwcaps; break; default: - sr_err("Unknown info_id: %d.", info_id); return SR_ERR_ARG; }