Ignore:
Timestamp:
Dec 14, 2005, 12:04:21 AM (18 years ago)
Author:
bcornec
Message:

Usage of parted2fdisk instead of fdisk everywhere.
on ia64 this is mandatory, and simplifies the infrastructure
on other archs, it doesn't change anything as parted2fdisk here is a link to fdisk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.05/mindi/aux-tools/sbin/calc-disk-size

    r30 r196  
    66CalcDiskSize() {
    77    local res cylinders sectorsize disksize i curr stub out
    8     res=`fdisk -l $1 2> /dev/null | grep -i "cylinders of"`
     8    res=`parted2fdisk -l $1 2> /dev/null | grep -i "cylinders of"`
    99    cylinders=`echo "$res" | cut -d' ' -f5`
    1010    sectorsize=`echo "$res" | cut -d' ' -f7`
    11     cylindermod=`fdisk -l $1 2> /dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info
     11    cylindermod=`parted2fdisk -l $1 2> /dev/null | grep -i $1:`; # note colon at end to make sure it's not the /dev/sda# partition info
    1212    cylnum=`echo "$cylindermod" | cut -d' ' -f7`
    1313    predisksize=$(($cylinders*$sectorsize/1024))
Note: See TracChangeset for help on using the changeset viewer.