lkml.org 
[lkml]   [1997]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject/proc/meminfo layout fix for >100MB

The headings in /proc/meminfo are not aligned on machines with more than
100MB of RAM.

astor


--- array.c Sun Sep 21 19:50:01 1997
+++ array.c.new Wed Oct 15 19:10:37 1997
@@ -299,9 +299,9 @@

si_meminfo(&i);
si_swapinfo(&i);
- len = sprintf(buffer, " total: used: free: shared:
buffers: cached:\n"
- "Mem: %8lu %8lu %8lu %8lu %8lu %8lu\n"
- "Swap: %8lu %8lu %8lu\n",
+ len = sprintf(buffer, " total: used: free:
shared: buffers: cached:\n"
+ "Mem: %10lu %10lu %10lu %10lu %10lu %10lu\n"
+ "Swap: %10lu %10lu %10lu\n",
i.totalram, i.totalram-i.freeram, i.freeram, i.sharedram,
i.bufferram, page_cache_size*PAGE_SIZE,
i.totalswap, i.totalswap-i.freeswap, i.freeswap);
/*


\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.074 / U:0.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site