bug-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why the piece of code determined the disk access mode?


From: Jason Luo
Subject: Why the piece of code determined the disk access mode?
Date: Tue, 08 Jun 2004 15:04:11 +0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.6) Gecko/20040601

Hi All,

I read the sources of grub 0.94,I found the code in stage2/common.c that determin the disk access mode.I'm confused.the code is,

    264       if (get_diskinfo (drive, &geom))
    265         break;
    266
    267       /* Clean out the I/O map.  */
    268       grub_memset ((char *) io_map, 0,
    269                    IO_MAP_SIZE * sizeof (unsigned short));
    270
271 /* Disable to probe I/O ports temporarily, because this doesn't
    272          work with some BIOSes (maybe they are too buggy).  */
    273 #if 0
    274       /* Track the int13 handler.  */
    275       track_int13 (drive);
    276 #endif
    277
    278       /* Set the information.  */
    279       info->drive_number = drive;
280 info->drive_mode = ((geom.flags & BIOSDISK_FLAG_LBA_EXTENSION)
    281                           ? MB_DI_LBA_MODE : MB_DI_CHS_MODE);


geom.flags is 0,The process can not process to line 280. so ,the geom.flags is alway larger than or equal to 0.What's the situation geom.flags is equal to 0?if geom.flags is larger than 0,can it determin the disk's access mode is LBA ?

thanks!

Jason




reply via email to

[Prev in Thread] Current Thread [Next in Thread]