diff options
author | Karel Zak | 2009-10-16 01:35:55 +0200 |
---|---|---|
committer | Karel Zak | 2009-10-16 01:35:55 +0200 |
commit | 1aff9b620eba8850b4819ebf32ed9fcf958e652c (patch) | |
tree | 414265f031ca9240aec06f99ae65d85bc3599903 /partx/partx.c | |
parent | losetup: remove unused macro (diff) | |
download | kernel-qcow2-util-linux-1aff9b620eba8850b4819ebf32ed9fcf958e652c.tar.gz kernel-qcow2-util-linux-1aff9b620eba8850b4819ebf32ed9fcf958e652c.tar.xz kernel-qcow2-util-linux-1aff9b620eba8850b4819ebf32ed9fcf958e652c.zip |
partx: use c.h
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'partx/partx.c')
-rw-r--r-- | partx/partx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/partx/partx.c b/partx/partx.c index 25485fff2..16ea1fab0 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -43,14 +43,13 @@ #endif #include <linux/blkpg.h> +#include "c.h" #include "blkdev.h" #include "partx.h" #include "crc32.h" static void errmerge(int err, int m, char *msg1, char *msg2); -#define SIZE(a) (sizeof(a)/sizeof((a)[0])) - #define MAXTYPES 64 #define MAXSLICES 256 @@ -264,7 +263,7 @@ main(int argc, char **argv){ for (i = 0; i < ptct; i++) { ptp = &pts[i]; if (!type || !strcmp(type, ptp->type)) { - n = ptp->fn(fd, all, slices, SIZE(slices)); + n = ptp->fn(fd, all, slices, ARRAY_SIZE(slices)); if (n >= 0 && verbose) printf("%s: %d slices\n", ptp->type, n); if (n > 0 && (verbose || what == LIST)) { |