>From ec887d9e029910f089eff2f6352ae19d8af508f5 Mon Sep 17 00:00:00 2001
From: Lionel Landwerlin <lionel.landwerlin@openwide.fr>
Date: Tue, 2 Dec 2008 10:19:46 +0100
Subject: [PATCH] Rename syscall_hook functions

---
 linux-user/syscall_hook.c |   46 ++++++++++++++++++++++----------------------
 linux-user/syscall_hook.h |   16 +++++++-------
 2 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/linux-user/syscall_hook.c b/linux-user/syscall_hook.c
index 06fbff3..b85628f 100644
--- a/linux-user/syscall_hook.c
+++ b/linux-user/syscall_hook.c
@@ -21,22 +21,22 @@
 
 #define ARRAY_SIZE(array) (sizeof (array) / sizeof (array[0]))
 
-typedef struct _qemu_syscall_hook_t {
-    struct _qemu_syscall_hook_t prev;
-    struct _qemu_syscall_hook_t next;
+typedef struct _syscall_hook_t {
+    struct _syscall_hook_t prev;
+    struct _syscall_hook_t next;
 
     unsigned int priority;
 
     syscall_hook_cb_t callback;
-} qemu_syscall_hook_t;
+} syscall_hook_t;
 
-static qemu_syscall_hook_t *syscall_hooks[MAX_SYSCALL];
+static syscall_hook_t *syscall_hooks[MAX_SYSCALL];
 
-static qemu_syscall_hook_t *
+static syscall_hook_t *
 _hook_new (syscall_hook_cb_t callback, unsigned int prio)
 {
-    qemu_syscall_hook_t *hook =
-        (qemu_syscall_hook_t *) calloc (1, sizeof (qemu_syscall_hook_t));
+    syscall_hook_t *hook =
+        (syscall_hook_t *) calloc (1, sizeof (syscall_hook_t));
 
     if (hook) {
         hook->callback = callback;
@@ -47,7 +47,7 @@ _hook_new (syscall_hook_cb_t callback, unsigned int prio)
 }
 
 static void
-_hook_free (qemu_syscall_hook_t *hook)
+_hook_free (syscall_hook_t *hook)
 {
     if (hook)
         free (hook);
@@ -55,8 +55,8 @@ _hook_free (qemu_syscall_hook_t *hook)
 
 static void
 _hook_insert_after (int num,
-                    qemu_syscall_hook_t *old,
-                    qemu_syscall_hook_t *new)
+                    syscall_hook_t *old,
+                    syscall_hook_t *new)
 {
     new->prev = old;
     new->next = old->next;
@@ -66,8 +66,8 @@ _hook_insert_after (int num,
 
 static void
 _hook_insert_before (int num,
-                     qemu_syscall_hook_t *old,
-                     qemu_syscall_hook_t *new)
+                     syscall_hook_t *old,
+                     syscall_hook_t *new)
 {
     new->prev = old->prev;
     new->next = old;
@@ -76,8 +76,7 @@ _hook_insert_before (int num,
 }
 
 static void
-_hook_remove (int num,
-              qemu_syscall_hook_t *hook)
+_hook_remove (int num, syscall_hook_t *hook)
 {
     if (list->prev)
         list->prev->next = list->next;
@@ -88,7 +87,7 @@ _hook_remove (int num,
 }
 
 void
-qemu_syscall_hook_init (void)
+syscall_hook_init (void)
 {
     int i;
 
@@ -97,9 +96,10 @@ qemu_syscall_hook_init (void)
 }
 
 int
-qemu_syscall_hook_register (int num, syscall_hook_cb_t callback, unsigned int prio)
+syscall_hook_register (int num, syscall_hook_cb_t callback,
+                       unsigned int prio)
 {
-    qemu_syscall_hook_t *new;
+    syscall_hook_t *new;
 
     if (num >= ARRAY_SIZE (syscall_hooks))
         return 0;
@@ -109,7 +109,7 @@ qemu_syscall_hook_register (int num, syscall_hook_cb_t callback, unsigned int pr
     if (syscall_hooks[num] == NULL) {
         syscall_hooks[num] = new;
     } else {
-        qemu_syscall_hook_t *plist, *nlist;
+        syscall_hook_t *plist, *nlist;
 
         plist = NULL;
         nlist = syscall_hooks[num];
@@ -133,9 +133,9 @@ qemu_syscall_hook_register (int num, syscall_hook_cb_t callback, unsigned int pr
 }
 
 void
-qemu_syscall_hook_unregister (int num, syscall_hook_cb_t callback)
+syscall_hook_unregister (int num, syscall_hook_cb_t callback)
 {
-    qemu_syscall_hook_t *list;
+    syscall_hook_t *list;
 
     if (num >= ARRAY_SIZE (syscall_hooks))
         return;
@@ -153,12 +153,12 @@ qemu_syscall_hook_unregister (int num, syscall_hook_cb_t callback)
 }
 
 int
-qemu_syscall_traverse (void *cpu_env, int num,
+syscall_hook_traverse (void *cpu_env, int num,
                        abi_long arg1, abi_long arg2,
                        abi_long arg3, abi_long arg4,
                        abi_long arg5, abi_long arg6)
 {
-    qemu_syscall_hook_t *list;
+    syscall_hook_t *list;
 
     if (num >= ARRAY_SIZE (syscall_hooks))
         return 0;
diff --git a/linux-user/syscall_hook.h b/linux-user/syscall_hook.h
index ad6a69b..72c0306 100644
--- a/linux-user/syscall_hook.h
+++ b/linux-user/syscall_hook.h
@@ -29,15 +29,15 @@ typedef int (*syscall_hook_cb_t) (void *cpu_env, int num,
                                   abi_long arg3, abi_long arg4,
                                   abi_long arg5, abi_long arg6);
 
-void qemu_syscall_hook_init (void);
+void syscall_hook_init (void);
 
-int qemu_syscall_hook_register (int num, syscall_hook_cb_t callback,
-                                unsigned int prio);
-void qemu_syscall_hook_unregister (int num, syscall_hook_cb_t callback);
+int syscall_hook_register (int num, syscall_hook_cb_t callback,
+                           unsigned int prio);
+void syscall_hook_unregister (int num, syscall_hook_cb_t callback);
 
-int qemu_syscall_traverse (void *cpu_env, int num,
-                           abi_long arg1, abi_long arg2,
-                           abi_long arg3, abi_long arg4,
-                           abi_long arg5, abi_long arg6);
+int syscall_traverse (void *cpu_env, int num,
+                      abi_long arg1, abi_long arg2,
+                      abi_long arg3, abi_long arg4,
+                      abi_long arg5, abi_long arg6);
 
 #endif /* __SYSCALL_HOOK_H__ */
-- 
1.5.6.5

