All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [Patch] darwin-user: revert host_info patch and don't fail if sysctl is unknown when we are on the same host/target
@ 2007-02-16  9:39 Pierre d'Herbemont
  0 siblings, 0 replies; only message in thread
From: Pierre d'Herbemont @ 2007-02-16  9:39 UTC (permalink / raw)
  To: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

Hi,

This fix the x86-on-x86 and ppc-on-ppc.

Pierre.

ChangeLog:
Revert host_info changes and don't fail if sysctl is unknown when we  
are on the same host/target.


[-- Attachment #2: fix_darwin_user.diff.txt --]
[-- Type: text/plain, Size: 1394 bytes --]

Index: darwin-user/syscall.c
===================================================================
RCS file: /sources/qemu/qemu/darwin-user/syscall.c,v
retrieving revision 1.2
diff -u -r1.2 syscall.c
--- darwin-user/syscall.c	5 Feb 2007 19:47:42 -0000	1.2
+++ darwin-user/syscall.c	16 Feb 2007 09:36:54 -0000
@@ -367,7 +367,14 @@
         case 200: /* host_info */
         {
             mig_reply_error_t *err = (mig_reply_error_t *)hdr;
-            struct host_basic_info *data = (void *)(err+1);
+            struct {
+                uint32_t unknow1;
+                uint32_t max_cpus;
+                uint32_t avail_cpus;
+                uint32_t memory_size;
+                uint32_t cpu_type;
+                uint32_t cpu_subtype;
+            } *data = (void *)(err+1);
 
             DPRINTF("maxcpu = 0x%x\n",   data->max_cpus);
             DPRINTF("numcpu = 0x%x\n",   data->avail_cpus);
@@ -1342,9 +1349,12 @@
     if(name) /* Sometimes sysctl is called with no arg1, ignore */
         ret = get_errno(sysctl(name, namelen, oldp, oldlenp, newp, newlen));
 
+#if defined(TARGET_I386) ^ defined(__i386__) || defined(TARGET_PPC) ^ defined(__ppc__)
     if (!is_error(ret) && bswap_syctl(name, namelen, oldp, *oldlenp) != 0) {
         return -ENOTDIR;
     }
+#endif
+
     if(name) {
         //bswap_syctl(name, namelen, newp, newlen);
         tswap32s((uint32_t*)oldlenp);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-02-16  9:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16  9:39 [Qemu-devel] [Patch] darwin-user: revert host_info patch and don't fail if sysctl is unknown when we are on the same host/target Pierre d'Herbemont

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.