Bug 147274 - Sysinfo HDD display error with large device
Summary: Sysinfo HDD display error with large device
Status: RESOLVED FIXED
Alias: None
Product: konversation
Classification: Applications
Component: general (show other bugs)
Version: 1.0.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konversation Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-26 23:07 UTC by Yann Verry
Modified: 2007-07-07 18:46 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yann Verry 2007-06-26 23:07:20 UTC
Version:           1.0.1 (using KDE KDE 3.5.7)
Installed from:    Ubuntu Packages
OS:                Linux

in sysinfo script when you have a long device on your hdd, the df -l display on two line not one.

Example :

Sys. de fich.        1K-blocs       Occupé Disponible Capacité Monté sur
/dev/mapper/nvidia_ccchegbfp1
                      59515524   8800100  47643396  16% /
/dev/mapper/nvidia_ccchegbfp3
                      31738420  16652176  13448016  56% /var
/dev/mapper/nvidia_ccchegbfp2
                     138865648  74942200  56755648  57% /home
tmpfs                  2029292         0   2029292   0% /dev/shm

I propose to add one option of 'df' command : -P (POSIX)
The result is :

Sys. de fich.      1024-blocks      Used Available Capacity Monté sur
/dev/mapper/nvidia_ccchegbfp1  59515524   8799964  47643532      16% /
/dev/mapper/nvidia_ccchegbfp3  31738420  16652176  13448016      56% /var
/dev/mapper/nvidia_ccchegbfp2 138865648  74955144  56742704      57% /home
tmpfs                  2029292         0   2029292       0% /dev/shm

and sysinfo report in HDD section good information
Comment 1 Peter Simonsson 2007-07-07 18:46:04 UTC
SVN commit 684946 by psn:

Add -P to the df options to handle long device names better as suggested by Yann Verry.
BUG:147274


 M  +1 -1      sysinfo  


--- branches/extragear/kde3/network/konversation/scripts/sysinfo #684945:684946
@@ -32,7 +32,7 @@
 }
 ' /proc/cpuinfo )
   
-HDD=$(df -l| awk '($1~/\/dev/){
+HDD=$(df -lP| awk '($1~/\/dev/){
   use+=$3/1024^2;
   tot+=$2/1024^2;
  }