Notify of mult-ioctl violation during preprocessing instead of bailing out in runtime. Would not even allow bogus copies of mmc-utils binaries wondering about out there. Signed-off-by: Avri Altman <avri.altman@xxxxxxx> --- mmc_cmds.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/mmc_cmds.c b/mmc_cmds.c index df66986..a4819ab 100644 --- a/mmc_cmds.c +++ b/mmc_cmds.c @@ -2113,9 +2113,7 @@ static int do_rpmb_op(int fd, unsigned int out_cnt) { #ifndef MMC_IOC_MULTI_CMD - fprintf(stderr, "mmc-utils has been compiled without MMC_IOC_MULTI_CMD" - " support, needed by RPMB operation.\n"); - exit(1); +#error "mmc-utils needs MMC_IOC_MULTI_CMD support" #else int err; u_int16_t rpmb_type; @@ -2805,9 +2803,7 @@ out: int do_ffu(int nargs, char **argv) { #ifndef MMC_IOC_MULTI_CMD - fprintf(stderr, "mmc-utils has been compiled without MMC_IOC_MULTI_CMD" - " support, needed by FFU.\n"); - exit(1); +#error "mmc-utils needs MMC_IOC_MULTI_CMD support" #else int dev_fd, img_fd; int sect_done = 0, retry = 3, ret = -EINVAL; -- 2.40.0