use flexible sample limit specification (k/m/g)

HWCAP_LIMIT_SAMPLES is now passed to the driver as *uint64
This commit is contained in:
Bert Vermeulen 2010-05-15 23:30:17 +02:00
parent 989938f6cd
commit 2458ea6514
3 changed files with 6 additions and 3 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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;