>>>>> OKUJI Yoshinori writes:
OY> So, I propose to use a structure for a geometry.
I like that. I'm quite sick of all the heavily overloaded variables
in GRUB, and would like to work to eliminate them.
OY> Any comment?
Let's give it even more structure... something like this:
typedef enum
{
GEOMETRY_MODE_LINEAR = 0, /* Direct sector-numbered addressing. */
GEOMETRY_MODE_CHS, /* Cylinder/Head/Sector addressing. */
} GeometryMode;
typedef unsigned long long GeometryLinear;
typedef struct _GeometryCHS GeometryCHS;
typedef struct _Geometry Geometry;
typedef struct _GeometryCHS
{
unsigned long cylinders;
unsigned long heads;
unsigned long sectors;
} GeometryCHS;
struct _Geometry
{
GeometryMode mode;
union
{
GeometryLinear linear;
GeometryCHS chs;
} max;
};
--
Gordon Matzigkeit <[EMAIL PROTECTED]> //\ I'm a FIG (http://www.fig.org/)
Committed to freedom and diversity \// I use GNU (http://www.gnu.org/)