Skip to contentSkip to conversation

syscall uselib

PATCH In review Kirill A. Shutemov 1 participant 2 messages Feb 19, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 syscall uselib

Fixed Debian patch in the attachment. uselib is deprecated, but I think it should be implemented by qemu, because it's in the kernel yet.

#1 lore raw
Quoted 2 lines · Kirill A. Shutemov

Fixed Debian patch in the attachment. uselib is deprecated, but I think it should be implemented by qemu, because it's in the kernel yet.

Sorry, attached.

syscall.c renamed from syscall.c.orig +6 -1
@@ -173,6 +175,7 @@ extern int getresuid(uid_t *, uid_t *, u
 extern int setresgid(gid_t, gid_t, gid_t);
 extern int getresgid(gid_t *, gid_t *, gid_t *);
 extern int setgroups(int, gid_t *);
+extern int uselib(const char*);
 
 static inline long get_errno(long ret)
 {
@@ -2742,7 +2745,11 @@ long do_syscall(void *cpu_env, int num, 
         }
         break;
     case TARGET_NR_uselib:
-        goto unimplemented;
+        p = lock_user_string(arg1);
+        ret = get_errno(uselib(path(p)));
+        unlock_user(p, arg1, 0);
+        break;
+
     case TARGET_NR_swapon:
         p = lock_user_string(arg1);
         ret = get_errno(swapon(p, arg2));