From ef2eb01d13104158dd6bf1676b9217c2df7d0272 Mon Sep 17 00:00:00 2001 From: Christophe Grenier Date: Sat, 9 Jun 2012 16:05:53 +0200 Subject: [PATCH] Cleanup some constants in src/common.h --- src/common.h | 6 +----- src/geometry.c | 2 ++ 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/common.h b/src/common.h index 2121c17a..aa529aeb 100644 --- a/src/common.h +++ b/src/common.h @@ -36,11 +36,7 @@ struct efi_guid_s uint8_t node[6]; } __attribute__ ((__packed__)); -#define DEFAULT_SECTOR_SIZE 0x200 - -#define MAX_CYLINDERS 65535 -#define MAX_HEADS 255 -#define MAX_SECTORS 63 +#define DEFAULT_SECTOR_SIZE 0x200u #define DISKNAME_MAX 64 #define DISKDESCRIPTION_MAX 128 diff --git a/src/geometry.c b/src/geometry.c index 8f382453..9c3eec65 100644 --- a/src/geometry.c +++ b/src/geometry.c @@ -41,6 +41,8 @@ #include "geometry.h" #include "autoset.h" +#define MAX_HEADS 255u + static inline void set_cylinders_from_size_up(disk_t *disk_car) { disk_car->geom.cylinders=(disk_car->disk_size / disk_car->sector_size +