From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MELSA-0001OM-RS for qemu-devel@nongnu.org; Wed, 10 Jun 2009 06:54:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MELS5-0001Ft-KZ for qemu-devel@nongnu.org; Wed, 10 Jun 2009 06:54:45 -0400 Received: from [199.232.76.173] (port=35651 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MELS5-0001Fc-4O for qemu-devel@nongnu.org; Wed, 10 Jun 2009 06:54:41 -0400 Received: from moutng.kundenserver.de ([212.227.126.187]:61369) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MELS4-0002QK-FA for qemu-devel@nongnu.org; Wed, 10 Jun 2009 06:54:40 -0400 Message-Id: <18605364.339131244631278462.JavaMail.servlet@kundenserver> From: Laurent Vivier Subject: Re: [Qemu-devel] [PATCH 0/7] target-ppc/linux-user: NPTL support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 10 Jun 2009 12:54:38 +0200 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: vmiklos@frugalware.org Cc: qemu-devel@nongnu.org, froydnj@codesourcery.com >On Wed, Jun 10, 2009 at 11:36:17AM +0200, Laurent Vivier =20 >wrote: >> >$ cat /proc/sys/fs/binfmt_misc/qemu-ppc >> >enabled >> >interpreter /usr/bin/qemu-ppc >>=20 >> so qemu must be located at /usr/bin/ not / under your chrooted filesyste= m. > >Ah, wow. > >So it was a bug on my side, now it works! > >OTOH, there is an other odd error. Here is a sample test program: > >#include >#include > >int main() >{ > struct stat buf; > if (stat("usr/bin/ls", &buf)) { > printf("not found\n"); > } else { > printf("found\n"); > } > return 0; >} > >host$ ppc-frugalware-linux-gcc hello2.c -o hello2 >host$ file hello2 >hello2: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 >(SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.3, not >stripped >host$ ./hello2 >found >host$ sudo chroot . >chroot:/# ./hello2 >not found >chroot:/# grep usr hello2.c > if (stat("usr/bin/ls", &buf)) { >chroot:/# ls usr/bin/ls >usr/bin/ls > >Is it a bug that stat() does not found what ls does, or have I missed >something? :) > IMHO, it looks like a bug, you should display errno, try also "ls -l". Laurent --=20 --------------------- Laurent@vivier.eu --------------------- "Tout ce qui est impossible reste =C3=A0 accomplir" Jules Verne "Things are only impossible until they're not" Jean-Luc Picard