define the incredible FLAWLESSCALL macro in one place
This commit is contained in:
parent
28a9c4ad96
commit
1af4db65a0
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rump_dev_private.h,v 1.10 2010/03/01 13:12:20 pooka Exp $ */
|
||||
/* $NetBSD: rump_dev_private.h,v 1.11 2010/03/25 19:54:19 pooka Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
|
||||
|
@ -39,4 +39,11 @@ struct mainbus_attach_args {
|
|||
int maa_unit;
|
||||
};
|
||||
|
||||
#define FLAWLESSCALL(call) \
|
||||
do { \
|
||||
int att_error; \
|
||||
if ((att_error = call) != 0) \
|
||||
panic("\"%s\" failed", #call); \
|
||||
} while (/*CONSTCOND*/0)
|
||||
|
||||
#endif /* _SYS_RUMP_DEV_PRIVATE_H_ */
|
||||
|
|
Loading…
Reference in New Issue