minix/minix/tests/mod.c
Lionel Sambuc 433d6423c3 New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
2014-07-31 16:00:30 +02:00

27 lines
423 B
C

/* Code for module to be loaded by test63. */
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
#include "magic.h"
long cookie = 0;
void exithandler(void);
long modfunction(long v1, long *argcookie, long v2) {
if(v1 != MAGIC4 || v2 != MAGIC5) {
fprintf(stderr, "wrong args to modfunction\n");
exit(1);
}
*argcookie = MAGIC3;
cookie = MAGIC2;
return MAGIC1;
}
void exithandler(void) {
/* OK */
}