projects
/
openwrt
/
staging
/
lynxis
/
omap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3403cbe
)
Fix negative calculation of the tmpfs for devices with few RAM (#3557)
author
Florian Fainelli
<florian@openwrt.org>
Thu, 14 Aug 2008 22:21:35 +0000
(22:21 +0000)
committer
Florian Fainelli
<florian@openwrt.org>
Thu, 14 Aug 2008 22:21:35 +0000
(22:21 +0000)
SVN-Revision: 12315
package/base-files/files/etc/preinit
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/preinit
b/package/base-files/files/etc/preinit
index 8c30fd8da16432eb8e20f65b6638e7ac0783198a..11b9100383f1248ac1ba47161d1a403518712484 100755
(executable)
--- a/
package/base-files/files/etc/preinit
+++ b/
package/base-files/files/etc/preinit
@@
-20,7
+20,7
@@
failsafe() {
mount proc /proc -t proc
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
if grep devfs /proc/filesystems > /dev/null; then