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>
This commit is contained in:
Chris Wilson 2012-02-28 09:31:17 +00:00
parent 2035119201
commit a50550f223

View File

@ -104,8 +104,7 @@ intel_get_total_ram_mb(void)
retval = (uint64_t) pagesize * npages; retval = (uint64_t) pagesize * npages;
#else #else
#warning "Unknown how to get RAM size for this OS" #error "Unknown how to get RAM size for this OS"
return 0;
#endif #endif
return retval / (1024*1024); return retval / (1024*1024);
@ -164,7 +163,8 @@ intel_get_total_swap_mb(void)
retval = (uint64_t) pagesize * totalpages; retval = (uint64_t) pagesize * totalpages;
#else #else
#error "Unknown how to get swap size for this OS" #warning "Unknown how to get swap size for this OS"
return 0;
#endif #endif
return retval / (1024*1024); return retval / (1024*1024);