[syslinux] [Syslinux] Patch sensible callback framework

H. Peter Anvin hpa at zytor.com
Mon Jun 7 14:59:44 PDT 2010


On 06/01/2010 05:21 AM, Ayvaz, James wrote:
> Following up on this.  Were there any more changes that I need to make to get this patch accepted?  Thanks.
> +
> +static inline struct callback_record* register_callback(struct callback_record *head, callback_t callback, void *rarg) {

Brackets go on the line after the function declaration, please.

The one thing I'd ask is that you make this patch against the
"pathbased" branch on the git tree, or equivalently against the
4.00-pre47 release.  Other than that, it's starting to look really good.

However, the INIT_CALLBACK() macro is confused.  The right way to use a
macro like that is to set it up as follows:

#define DECLARE_CALLBACK(name) 		\
struct callback_record name = { 	\
	.function 	= NULL,		\
	.next		= &name,	\
	.prev		= &name,	\
}

Then use it at the point of declaration:

DECLARE_CALLBACK(my_callback);

This allows the callback to be initialized statically.

	-hpa




More information about the Syslinux mailing list