From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VPCtJ-0004rt-UR for mharc-grub-devel@gnu.org; Thu, 26 Sep 2013 10:50:05 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58903) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPCtA-0004pE-Fe for grub-devel@gnu.org; Thu, 26 Sep 2013 10:50:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VPCt1-0001rI-QD for grub-devel@gnu.org; Thu, 26 Sep 2013 10:49:56 -0400 Received: from mail-lb0-x231.google.com ([2a00:1450:4010:c04::231]:47190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VPCt1-0001rB-Dk for grub-devel@gnu.org; Thu, 26 Sep 2013 10:49:47 -0400 Received: by mail-lb0-f177.google.com with SMTP id w7so1135849lbi.8 for ; Thu, 26 Sep 2013 07:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-type; bh=cKQ96wyf/rYfScq5HIzUkPvCB/M8pvSLO4C7VloFX74=; b=mRYvbOWih/ynINSK9Sdyl6rF1yvITC2YPkIyOSuG6M8cDZXXlKpVakyR9JLaL94UxI yPs9lraKtgm9/+ablJBIouHlOM/5QeXbrkkgmR0ZQDEWAsXJx7HHsi6ZWvNwfm482rag 9hKinwYU46AevnA+67eW++tefB6zOzsHpt4tBTqjfG1RttjuVQnpLxgtQw/ckItGX5Cb FVnh7eWU1w5EtVJlLJRD1ycVMOgEB0TYNlgxY8F4M1sVSel+fXSzStgjfBWDsqDHEzWE 5WwRw/ks4tAmg7Z+RD5mbPmS+h+M0azWeCMUeujXf3DOv1By2QUiO55u0V2Q9+du0PEe cVjQ== X-Received: by 10.112.168.35 with SMTP id zt3mr4180475lbb.11.1380206986257; Thu, 26 Sep 2013 07:49:46 -0700 (PDT) Received: from opensuse.site (ppp91-76-150-246.pppoe.mtu-net.ru. [91.76.150.246]) by mx.google.com with ESMTPSA id e4sm2613899lba.15.1969.12.31.16.00.00 (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 26 Sep 2013 07:49:45 -0700 (PDT) Date: Thu, 26 Sep 2013 18:49:44 +0400 From: Andrey Borzenkov To: grub-devel@gnu.org Subject: Re: [RFC] grub-install C rewrite Message-ID: <20130926184944.4f180e58@opensuse.site> In-Reply-To: <524431E6.60807@gmail.com> References: <524431E6.60807@gmail.com> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.18; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/Djwh5grtB_za1QmwQNCG5LP"; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::231 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Sep 2013 14:50:05 -0000 --Sig_/Djwh5grtB_za1QmwQNCG5LP Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable =D0=92 Thu, 26 Sep 2013 15:08:54 +0200 Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > Hello, all. Recently I made some order in hostdisk.c and getroot.c > involving splitting in OS-specific parts. > In the same time I added WinAPI version of getroot/hostdisk allowing > grub-probe to work on windows natively > Also on-going is AROS-specific parts. > Windows and AROS are not friendly with bash. > The attempt to make both multiple files of same type work and handling > whitespaces/newlines/... in filenames would result in very ugly code > with loads of evals. If we agree on bash as common denominator, bash has arrays which make this straightforward. Unless we want to continue support for bash 1.x. > Current code may have subtle assumptions on behaviour of common tools > like sed and on locale (E.g. "[a-z]" doesn't cover u if locale is Estonia= n). > So to check viability I rewrote grub-install in C. This is mostly proof > of concept with loads of FIXMEs but I could boot i386-pc install made > with it. In many aspects (static variables, some tests, general > structure) it's reminiscent of sh version of grub-install it's based on. > Some functionality is likely to stay OS-specific, e.g. executing > compressors or determining firmware. >=20 > I'd like to know the opinion of other people on possible switchover. If > switched then it'll have to be all grub-install, grub-mkrescue, > grub-mknetdir and grub-mkstandalone. > I'd like to hear from other people. --Sig_/Djwh5grtB_za1QmwQNCG5LP Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlJESYgACgkQR6LMutpd94zBaACguPbdGOT85swV5+Ww5UQ9FpEi OzAAnAj8BJvCfCKXu+VF/dvegm2SnW+v =kJwL -----END PGP SIGNATURE----- --Sig_/Djwh5grtB_za1QmwQNCG5LP--