From ededc31dd116dad6c47cc599286bc19af998ecf7 Mon Sep 17 00:00:00 2001 From: Nate Lawson Date: Thu, 17 Feb 2005 01:02:58 +0000 Subject: [PATCH] The correct error value for not having enough storage is E2BIG, not ENOMEM. The manpage and ichss(4) are correct. --- sys/dev/acpica/acpi_perf.c | 2 +- sys/dev/acpica/acpi_throttle.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi_perf.c b/sys/dev/acpica/acpi_perf.c index a8414d04c531..1956d7bd9ee7 100644 --- a/sys/dev/acpica/acpi_perf.c +++ b/sys/dev/acpica/acpi_perf.c @@ -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; diff --git a/sys/dev/acpica/acpi_throttle.c b/sys/dev/acpica/acpi_throttle.c index 22aa71f989ff..51894c2ee8c3 100644 --- a/sys/dev/acpica/acpi_throttle.c +++ b/sys/dev/acpica/acpi_throttle.c @@ -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);