Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons.
3 comments:
File tests/init_shutdown.c:
Patch Set #2, Line 108: /* Manual voltage setting */
It does more than that. Probably doesn't need a comment.
Done (comment removed)
File tests/io_mock.h:
You could also declare it above. […]
Done, it works! but I'm not sure I understand how it works... magic? :) I thought I understand why void* worked - because any pointer can be casted to void*, and real function with some pointer was replaced with wrap function with void*.
But now there is an entirely new type, which happens to have the same symbol as the old one? and they can replace each other?
File tests/tests.c:
void __wrap_test_outb(unsigned char value, unsigned short port)
{
/* LOG_ME; */
if (current_io && current_io->outb)
current_io->outb(current_io->state, value, port);
}
unsigned char __wrap_test_inb(unsigned short port)
{
/* LOG_ME; */
if (current_io && current_io->inb)
return current_io->inb(current_io->state, port);
return 0;
}
void __wrap_test_outw(unsigned short value, unsigned short port)
{
/* LOG_ME; */
if (current_io && current_io->outw)
current_io->outw(current_io->state, value, port);
}
unsigned short __wrap_test_inw(unsigned short port)
{
/* LOG_ME; */
if (current_io && current_io->inw)
return current_io->inw(current_io->state, port);
return 0;
}
void __wrap_test_outl(unsigned int value, unsigned short port)
{
/* LOG_ME; */
if (current_io && current_io->outl)
current_io->outl(current_io->state, value, port);
}
unsigned int __wrap_test_inl(unsigned short port)
{
this style fix that sneaked in here is a separate patch
Done CB:55974
To view, visit change 55934. To unsubscribe, or for help writing mail filters, visit settings.