2 ###APPNAME: diskimg-fstype
4 ###APPDATE: Sun Oct 7 01:36:57 2007
6 ###APPDESC: check fstype for partition of disk image.
7 ###APPUSAGE: (disk image file) (partition NUM)
8 ###APPEXAMPLE: diskimg-fstype disk.img 1
11 $ARGV[0]="-h" unless(@ARGV);
13 exit(system("plhelp",$0,@ARGV)) if($_ eq "-h" || $_ eq "--help");
18 die("File not exists\n") unless(-f
$disk);
34 open(TABLE
,"/sbin/fdisk -ul $disk 2>/dev/null |") or die("$!\n");
37 if(m{$name$num\s+\*?\s+(\d+)\s+(\d+)\s+(\d+)\s+([a-z0-9]+)\s+([a-zA-z0-9]+)$}) {