Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk.h
*/
+#include "c.h"
+
#define DEFAULT_SECTOR_SIZE 512
#define MAX_SECTOR_SIZE 2048
#define SECTOR_SIZE 512 /* still used in BSD code */
#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)
{BSD_FS_ADVFS, "AdvFS"},
{ 0, NULL }
};
-#define BSD_FSMAXTYPES (SIZE(xbsd_fstypes)-1)
+#define BSD_FSMAXTYPES (ARRAY_SIZE(xbsd_fstypes)-1)
#endif
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"));