summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2012-06-09 16:05:53 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2012-06-09 16:05:53 +0200
commitef2eb01d13104158dd6bf1676b9217c2df7d0272 (patch)
tree26cfd530a315337af90cfd22dfb6c26bf8c838ee /src
parentacea8bc334ba0d510445919675e12798027bc93b (diff)
Cleanup some constants in src/common.h
Diffstat (limited to 'src')
-rw-r--r--src/common.h6
-rw-r--r--src/geometry.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/common.h b/src/common.h
index 2121c17..aa529ae 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 8f38245..9c3eec6 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 +