From a50550f22341aa4ee17110ecc68953829ba0153e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 28 Feb 2012 09:31:17 +0000 Subject: [PATCH] lib: Downgrade error for unknown 'swap' not 'ram' Oops, my mistake for copying a compile fix from another machine... If we can't detect how much RAM we have, 0 is not a suitable default, so keep the error for the time being and only downgrade the error for unknown swap. Signed-off-by: Chris Wilson --- lib/intel_drm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/intel_drm.c b/lib/intel_drm.c index c35bc811..8d89d24f 100644 --- a/lib/intel_drm.c +++ b/lib/intel_drm.c @@ -104,8 +104,7 @@ intel_get_total_ram_mb(void) retval = (uint64_t) pagesize * npages; #else -#warning "Unknown how to get RAM size for this OS" - return 0; +#error "Unknown how to get RAM size for this OS" #endif return retval / (1024*1024); @@ -164,7 +163,8 @@ intel_get_total_swap_mb(void) retval = (uint64_t) pagesize * totalpages; #else -#error "Unknown how to get swap size for this OS" +#warning "Unknown how to get swap size for this OS" + return 0; #endif return retval / (1024*1024);