fdisk: use c.h

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2009-10-16 01:26:46 +02:00
parent 11ef0c35d6
commit 17d0d058fc
3 changed files with 4 additions and 4 deletions

View File

@ -2,6 +2,8 @@
fdisk.h
*/
#include "c.h"
#define DEFAULT_SECTOR_SIZE 512
#define MAX_SECTOR_SIZE 2048
#define SECTOR_SIZE 512 /* still used in BSD code */
@ -21,8 +23,6 @@
#define IS_EXTENDED(i) \
((i) == EXTENDED || (i) == WIN98_EXTENDED || (i) == LINUX_EXTENDED)
#define SIZE(a) (sizeof(a)/sizeof((a)[0]))
#define cround(n) (display_in_cyl_units ? ((n)/units_per_sector)+1 : (n))
#define scround(x) (((x)+units_per_sector-1)/units_per_sector)

View File

@ -224,7 +224,7 @@ static struct systypes xbsd_fstypes[] = {
{BSD_FS_ADVFS, "AdvFS"},
{ 0, NULL }
};
#define BSD_FSMAXTYPES (SIZE(xbsd_fstypes)-1)
#define BSD_FSMAXTYPES (ARRAY_SIZE(xbsd_fstypes)-1)
#endif

View File

@ -382,7 +382,7 @@ void verify_sun(void)
else
array[i] = -1;
}
qsort(array,SIZE(array),sizeof(array[0]),
qsort(array,ARRAY_SIZE(array),sizeof(array[0]),
(int (*)(const void *,const void *)) verify_sun_cmp);
if (array[0] == -1) {
printf(_("No partitions defined\n"));