Received: from eggs.gnu.org ([140.186.70.92]:58913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnQGU-0000xA-Dk for qemu-devel@nongnu.org; Wed, 18 Jan 2012 02:49:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RnQGO-0002ku-IQ for qemu-devel@nongnu.org; Wed, 18 Jan 2012 02:49:02 -0500 Received: from csmailer.cs.nctu.edu.tw ([140.113.235.130]:18180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RnQGN-0002kn-QT for qemu-devel@nongnu.org; Wed, 18 Jan 2012 02:48:56 -0500 Date: Wed, 18 Jan 2012 15:48:51 +0800 From: =?utf-8?B?6Zmz6Z+L5Lu7?= Message-ID: <20120118074851.GA23074@cs.nctu.edu.tw> References: <4F0BEBE8.6030708@gmail.com> <4F15E00C.70207@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <4F15E00C.70207@gmail.com> Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] Fwd: envlist_setenv... List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Davide Cc: qemu-devel@nongnu.org Hi, > What does this loop in main? >=20 > for (wrk =3D environ; *wrk !=3D NULL; wrk++) { > (void) envlist_setenv(envlist, *wrk); > } You can check envlist.[ch] first. I think what the loop does is copying= host environ (user environment. HOME, SHELL, PATH...etc) to struct envlist (en= vlist.c). Latter on, QEMU calls function envlist_to_environ to transform envlist to= target environ which is used by the guest application. HTH, chenwj --=20 Wei-Ren Chen (=E9=99=B3=E9=9F=8B=E4=BB=BB) Computer Systems Lab, Institute of Information Science, Academia Sinica, Taiwan (R.O.C.) Tel:886-2-2788-3799 #1667 Homepage: http://people.cs.nctu.edu.tw/~chenwj