无忧启动论坛

标题: 老九或123进来一下,关于ggghost的代码问题。 [打印本页]

作者: ls_qiang    时间: 2008-3-16 17:40
标题: 老九或123进来一下,关于ggghost的代码问题。
ggghost源代码中有以下一段:

CString Chdd::Getparttype(int pt,BOOL&bHide)
{
bHide=0;
switch (pt)
{
case PARTITION_ENTRY_UNUSED:
  return "未使用";
case PARTITION_FAT_12:
  return "FAT12";
case PARTITION_FAT_12+16:
  bHide=1;
  return "FAT12";
case PARTITION_FAT_16:
  bHide=1;
  return "FAT16";
case PARTITION_FAT_16+16:
  bHide=1;
  return "FAT16";
case PARTITION_FAT32:
  return "FAT32";
case PARTITION_FAT32+16:
  bHide=1;
  return "FAT32";
case PARTITION_FAT32_XINT13:
  return "FAT32";
case PARTITION_FAT32_XINT13+16:
  bHide=1;
  return "FAT32";
case PARTITION_EXTENDED:
  return "扩展";
case PARTITION_EXTENDED+16:
  bHide=1;
  return "扩展";
case PARTITION_HUGE:
  return "FAT16";
case PARTITION_HUGE+16:
  bHide=1;
  return "FAT16";
case PARTITION_IFS:
  return "NTFS";
case PARTITION_IFS+16:
  bHide=1;
  return "NTFS";
case VALID_NTFT:
  return "NTFS";
case VALID_NTFT+16:
  bHide=1;
  return "NTFS";
case PARTITION_NTFT:
  return "NTFS";
case PARTITION_NTFT+16:
  bHide=1;
  return "NTFS";
case PARTITION_XINT13:
  return "FAT16";
case PARTITION_XINT13+16:
  bHide=1;
  return "FAT16";
case PARTITION_XINT13_EXTENDED:
  return "扩展";
case PARTITION_XINT13_EXTENDED+16:
  bHide=1;
  return "扩展";
case PARTITION_LDM:
  return "LDM";
case PARTITION_LDM+16:
  bHide=1;
  return "LDM";
case 131:
  return "EXT2 3";
case 131+16:
  bHide=1;
  return "EXT2 3";
case 130:
  return "SWAP";
case 130+16:
  bHide=1;
  return "SWAP";
case PARTITION_XENIX_1:
  return "XENIX 1";
case PARTITION_XENIX_1+16:
  bHide=1;
  return "XENIX 1";
case PARTITION_XENIX_2:
  return "XENIX 1";
case PARTITION_XENIX_2+16:
  bHide=1;
  return "XENIX 2";
case PARTITION_PREP:
  return "PREP";
case PARTITION_PREP+16:
  bHide=1;
  return "PREP";
case PARTITION_UNIX:
  return "UNIX";
case PARTITION_UNIX+16:
  bHide=1;
  return "UNIX";
case 88:
  bHide=0;
  return "HPA";
}
CString str;
str.Format("类型%d",pt);
bHide=0;
return str;

}


现在有几个问题:

1.是否所有+16的都是隐藏分区?

2.如果第一条成立,那么红字部分为什么有判定它为隐藏?

3.蓝字部分为什么判定为fat16?

[ 本帖最后由 ls_qiang 于 2008-3-16 05:49 PM 编辑 ]
作者: 123    时间: 2008-3-16 17:59
根据测试经验,不一定正确
作者: 123    时间: 2008-3-16 18:05
红色字好像写错了  
作者: ls_qiang    时间: 2008-3-16 18:19
哦,明白,根据你的方法来处理并修改红字部分为:

case PARTITION_FAT_16:
  return "FAT16";


谢谢解答。




欢迎光临 无忧启动论坛 (http://wuyou.net./) Powered by Discuz! X3.3