Skip to content
Snippets Groups Projects
Commit 38d1cb8c authored by Florian Fainelli's avatar Florian Fainelli
Browse files

Fix negative calculation of the tmpfs for devices with few RAM (#3557)

SVN-Revision: 12315
parent 3403cbe9
No related branches found
No related tags found
No related merge requests found
...@@ -20,7 +20,7 @@ failsafe() { ...@@ -20,7 +20,7 @@ failsafe() {
mount proc /proc -t proc mount proc /proc -t proc
mount sysfs /sys -t sysfs mount sysfs /sys -t sysfs
size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)?mt-l:s}' /proc/meminfo) size=$(awk '/MemTotal:/ {l=5242880;mt=($2*1024);print((s=mt/2)<l)&&(mt>l)?mt-l:s}' /proc/meminfo)
mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777 mount tmpfs /tmp -t tmpfs -o size=$size,nosuid,nodev,mode=1777
if grep devfs /proc/filesystems > /dev/null; then if grep devfs /proc/filesystems > /dev/null; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment