lkml.org 
[lkml]   [1996]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectGB vs. MB
Date

I like the disk size message in sd.c but since 1MB == 1024*1024 == 2^20,
why is 1GB == 1000MB == 1000* 2^20 and not 1GB == 1024MB == 2^30 ?

I'd really like to see "real" GBs as 2^30 (which would be more consistent
but just the opposite from what all the disk vendors think a GB is
(or should be ;-))


Harald
-------------------------------------------------------------------------------
--- /soft/linux/drivers/scsi/sd.c Wed Apr 17 10:51:59 1996
+++ linux/drivers/scsi/sd.c Thu Apr 18 10:16:45 1996
@@ -1170,7 +1170,7 @@
}
mb = rscsi_disks[i].capacity / 1024 * hard_sector / 1024;
/* sz = div(m/100, 10); this seems to not be in the libr */
- m = (mb + 50) / 100;
+ m = (mb*1000 + 51200) / 1024 / 100 ;
sz_quot = m / 10;
sz_rem = m - (10 * sz_quot);
printk ("SCSI device sd%c: hdwr sector= %d bytes."


--
All SCSI disks will from now on ___ _____
be required to send an email notice 0--,| /OOOOOOO\
24 hours prior to complete hardware failure! <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig, \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik // / \\ \
koenig@tat.physik.uni-tuebingen.de ^^^^^ ^^^^^
\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.120 / U:5.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site