The correct error value for not having enough storage is E2BIG, not

ENOMEM.  The manpage and ichss(4) are correct.
This commit is contained in:
njl 2005-02-17 01:02:58 +00:00
parent 2adbdedf6e
commit feaf9a380e
2 changed files with 2 additions and 2 deletions

View File

@ -401,7 +401,7 @@ acpi_px_settings(device_t dev, struct cf_setting *sets, int *count, int *type)
if (sets == NULL || count == NULL)
return (EINVAL);
if (*count < sc->px_count - sc->px_max_avail)
return (ENOMEM);
return (E2BIG);
/* Return a list of settings that are currently valid. */
y = 0;

View File

@ -329,7 +329,7 @@ acpi_thr_settings(device_t dev, struct cf_setting *sets, int *count, int *type)
if (sets == NULL || count == NULL)
return (EINVAL);
if (*count < CPU_MAX_SPEED)
return (ENOMEM);
return (E2BIG);
/* Return a list of valid settings for this driver. */
memset(sets, CPUFREQ_VAL_UNKNOWN, sizeof(*sets) * CPU_MAX_SPEED);