File 0001-Handle-big-loadavg-values-correctly.patch of Package erlang

From e36017157ee5d8d7f50a769a2ecfce4ece1eea64 Mon Sep 17 00:00:00 2001
From: "Viacheslav V. Kovalev" <kovyl2404@gmail.com>
Date: Sat, 10 Jan 2015 14:31:28 +0300
Subject: [PATCH] Handle big loadavg values correctly

Do not crash with badmatch when integer part of loadavg has more than 2
digits.
---
 lib/os_mon/src/cpu_sup.erl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/os_mon/src/cpu_sup.erl b/lib/os_mon/src/cpu_sup.erl
index 1f088ec..66e7973 100644
--- a/lib/os_mon/src/cpu_sup.erl
+++ b/lib/os_mon/src/cpu_sup.erl
@@ -221,7 +221,7 @@ get_uint32_measurement(Request, #internal{port = P, os_type = {unix, sunos}}) ->
     port_server_call(P, Request);
 get_uint32_measurement(Request, #internal{os_type = {unix, linux}}) ->
     {ok,F} = file:open("/proc/loadavg",[read,raw]),
-    {ok,D} = file:read(F,24),
+    {ok,D} = file:read_line(F),
     ok = file:close(F),
     {ok,[Load1,Load5,Load15,_PRun,PTotal],_} = io_lib:fread("~f ~f ~f ~d/~d", D),
     case Request of
-- 
2.1.4