From f410c06c4a6cb96c531b5c8794bbe94d1b592d7c Mon Sep 17 00:00:00 2001 From: emaste Date: Mon, 21 Dec 2015 16:12:41 +0000 Subject: makefs: use ENTRY macro for diff reduction with NetBSD Sponsored by: The FreeBSD Foundation --- usr.sbin/makefs/makefs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c index bca9722..79cffed 100644 --- a/usr.sbin/makefs/makefs.c +++ b/usr.sbin/makefs/makefs.c @@ -66,9 +66,12 @@ typedef struct { } fstype_t; static fstype_t fstypes[] = { - { "ffs", ffs_prep_opts, ffs_parse_opts, ffs_cleanup_opts, ffs_makefs }, - { "cd9660", cd9660_prep_opts, cd9660_parse_opts, cd9660_cleanup_opts, - cd9660_makefs}, +#define ENTRY(name) { \ + # name, name ## _prep_opts, name ## _parse_opts, \ + name ## _cleanup_opts, name ## _makefs \ +} + ENTRY(ffs), + ENTRY(cd9660), { .type = NULL }, }; -- cgit v1.1