aboutsummaryrefslogtreecommitdiffstats
path: root/com32/elflink/modules
diff options
context:
space:
mode:
authorStefan Bucur <stefanb@zytor.com>2008-08-14 22:08:12 +0300
committerStefan Bucur <stefan@stefan-ubumac.(none)>2009-03-15 10:10:51 +0200
commitad765d63f72c193972629de32f930a669ca2e361 (patch)
treeabbec72c085ba87d23540f15ff00440bda9fc3dd /com32/elflink/modules
parent83955ce691dfcf8afaccb4c36d800ae7ab50a1e0 (diff)
downloadsyslinux-elf-ad765d63f72c193972629de32f930a669ca2e361.tar.gz
syslinux-elf-ad765d63f72c193972629de32f930a669ca2e361.tar.xz
syslinux-elf-ad765d63f72c193972629de32f930a669ca2e361.zip
Added a new execution API on top of the module API.
Diffstat (limited to 'com32/elflink/modules')
-rw-r--r--com32/elflink/modules/hello.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/com32/elflink/modules/hello.c b/com32/elflink/modules/hello.c
index 2386ecb3..dc87004d 100644
--- a/com32/elflink/modules/hello.c
+++ b/com32/elflink/modules/hello.c
@@ -16,11 +16,11 @@
#define MAX_NUM 100
-static int hello_init(void) {
+static int hello_main(int argc, char **argv) {
int *nums = NULL;
int i;
- printf("Hello, world, from 0x%08X!\n", (unsigned int)&hello_init);
+ printf("Hello, world, from 0x%08X!\n", (unsigned int)&hello_main);
nums = malloc(NUM_COUNT*sizeof(int));
@@ -47,9 +47,5 @@ static int hello_init(void) {
return 0;
}
-static void hello_exit(void) {
- printf("Good bye, cruel world!\n");
-}
-MODULE_INIT(hello_init);
-MODULE_EXIT(hello_exit);
+MODULE_MAIN(hello_main);