summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-28 09:31:17 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-28 09:31:17 +0000
commita50550f22341aa4ee17110ecc68953829ba0153e (patch)
tree8975a75c2f34245cd74e9f6083547034fa4b5e2d /lib
parent2035119201b4c63fe84d3883ae1b1c058bcc862c (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/intel_drm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/intel_drm.c b/lib/intel_drm.c
index c35bc81..8d89d24 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);