use flexible sample limit specification (k/m/g)
HWCAP_LIMIT_SAMPLES is now passed to the driver as *uint64
This commit is contained in:
parent
989938f6cd
commit
2458ea6514
|
@ -448,7 +448,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
|
|||
} else if (capability == HWCAP_PROBECONFIG) {
|
||||
ret = configure_probes((GSList *) value);
|
||||
} else if (capability == HWCAP_LIMIT_SAMPLES) {
|
||||
limit_samples = strtoull(value, NULL, 10);
|
||||
tmp_u64 = value;
|
||||
limit_samples = *tmp_u64;
|
||||
ret = SIGROK_OK;
|
||||
} else if (capability == HWCAP_CAPTURE_RATIO) {
|
||||
capture_ratio = strtol(value, NULL, 10);
|
||||
|
|
|
@ -511,7 +511,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
|
|||
} else if (capability == HWCAP_PROBECONFIG) {
|
||||
ret = configure_probes((GSList *) value);
|
||||
} else if (capability == HWCAP_LIMIT_SAMPLES) {
|
||||
limit_samples = strtoull(value, NULL, 10);
|
||||
tmp_u64 = value;
|
||||
limit_samples = *tmp_u64;
|
||||
ret = SIGROK_OK;
|
||||
} else {
|
||||
ret = SIGROK_ERR;
|
||||
|
|
|
@ -472,7 +472,8 @@ static int hw_set_configuration(int device_index, int capability, void *value)
|
|||
case HWCAP_PROBECONFIG:
|
||||
return configure_probes((GSList *) value);
|
||||
case HWCAP_LIMIT_SAMPLES:
|
||||
limit_samples = strtoull(value, NULL, 10);
|
||||
tmp_u64 = value;
|
||||
limit_samples = *tmp_u64;
|
||||
return SIGROK_OK;
|
||||
default:
|
||||
return SIGROK_ERR;
|
||||
|
|
Loading…
Reference in New Issue