diff options
author | Phil Davis <phil.davis@world.inf.org> | 2013-09-02 03:54:22 -0700 |
---|---|---|
committer | Phil Davis <phil.davis@world.inf.org> | 2013-09-02 03:54:22 -0700 |
commit | d613b9d52225278d1319626b5508c91ea7b6935d (patch) | |
tree | 986793b2aa899df291fe7556544329896d68200a | |
parent | 3fcb6a21a33f2260b18b59100aee3ec69a3e3988 (diff) | |
download | pfsense-d613b9d52225278d1319626b5508c91ea7b6935d.zip pfsense-d613b9d52225278d1319626b5508c91ea7b6935d.tar.gz |
Improve var names in get_memory
Backport from master
-rw-r--r-- | etc/inc/util.inc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc index d6d05ac..58153aa 100644 --- a/etc/inc/util.inc +++ b/etc/inc/util.inc @@ -1514,14 +1514,15 @@ function set_sysctl($values) { * get_memory() * returns an array listing the amount of * memory installed in the hardware - * [0]real and [1]available + * [0] net memory available for the OS (FreeBSD) after some is taken by BIOS, video or whatever - e.g. 235 MBytes + * [1] real (actual) memory of the system, should be the size of the RAM card/s - e.g. 256 MBytes */ function get_memory() { - $real = trim(`sysctl -n hw.physmem`, " \n"); - $avail = trim(`sysctl -n hw.realmem`, " \n"); + $physmem = trim(`sysctl -n hw.physmem`, " \n"); + $realmem = trim(`sysctl -n hw.realmem`, " \n"); /* convert from bytes to megabytes */ - return array(($real/1048576),($avail/1048576)); + return array(($physmem/1048576),($realmem/1048576)); } function mute_kernel_msgs() { |