From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YCu2U-0000Qt-L8 for mharc-grub-devel@gnu.org; Sun, 18 Jan 2015 12:53:30 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCu2R-0000QV-Sd for grub-devel@gnu.org; Sun, 18 Jan 2015 12:53:29 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YCu2O-0006ZV-La for grub-devel@gnu.org; Sun, 18 Jan 2015 12:53:27 -0500 Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]:50831) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YCu2O-0006ZP-DR for grub-devel@gnu.org; Sun, 18 Jan 2015 12:53:24 -0500 Received: by mail-lb0-f175.google.com with SMTP id z11so24970274lbi.6 for ; Sun, 18 Jan 2015 09:53:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=kxOIw/mJ7m+IYgLORGxoB6Yr2T8Lwv2sj2z4R4lXfeQ=; b=YKVLLaezcOOk75GveYtR77lJ+6OlhnAHIQ1bvo0G1DOpasaR0bI5mt+slrZpO1ZLdk MU7QFv6SKv+Z/m2LzzgllkHnlPFhaEL0IlRJeAhooTm/3CW/iLqNsPufcUP2se7qNlYI eWk3zX/RlsnTYTUUzF1PZwdlz6UZgD2FKC/eQ2f1TLTxBXhIZwHoSBR4k0TgBv24/bGd baZQsqwAeJB+4SG6rhoqpd6YeVJoZqis3HBZl/tMlAf2l/+pL6MaJ81FoAno+KreVfCM e4f/u/Cgu4Ig8LldNSSzCisLPxvRF1J97wTcWZHkgjpJfR09okkCfn+xfSsassTWeO58 pOBg== X-Received: by 10.112.150.194 with SMTP id uk2mr25828780lbb.84.1421603603439; Sun, 18 Jan 2015 09:53:23 -0800 (PST) Received: from opensuse.site (ppp91-76-14-38.pppoe.mtu-net.ru. [91.76.14.38]) by mx.google.com with ESMTPSA id jg8sm2462997lbc.0.2015.01.18.09.53.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 18 Jan 2015 09:53:22 -0800 (PST) Date: Sun, 18 Jan 2015 20:53:20 +0300 From: Andrei Borzenkov To: Felix Janda Subject: Re: [PATCH] On linux require the libc to have large file support Message-ID: <20150118205320.14a5945f@opensuse.site> In-Reply-To: <20150117135706.GA23804@euler> References: <20150117135706.GA23804@euler> X-Mailer: Claws Mail 3.11.0 (GTK+ 2.24.25; x86_64-suse-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22f Cc: grub-devel@gnu.org 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: Sun, 18 Jan 2015 17:53:29 -0000 =D0=92 Sat, 17 Jan 2015 14:57:07 +0100 Felix Janda =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > With this, support code in grub-core/osdep/unix/hostdisk.c > for old glibc releases could be removed. > --- > This patch tries to address the issues raised in >=20 > http://lists.gnu.org/archive/html/grub-devel/2014-12/msg00030.html > --- > INSTALL | 1 + > configure.ac | 5 +++++ > grub-core/osdep/unix/hostdisk.c | 25 ------------------------- > 3 files changed, 6 insertions(+), 25 deletions(-) >=20 > diff --git a/INSTALL b/INSTALL > index b67cd7f..ac7c2aa 100644 > --- a/INSTALL > +++ b/INSTALL > @@ -39,6 +39,7 @@ configuring the GRUB. > On GNU/Linux, you also need: > =20 > * libdevmapper 1.02.34 or later (recommended) > +* a libc with large file support (e.g. glibc 2.1 or later) > =20 > For optional grub-emu features, you need: > =20 > diff --git a/configure.ac b/configure.ac > index 31d2b0b..bdaebb8 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -346,6 +346,11 @@ AC_GNU_SOURCE > AM_GNU_GETTEXT([external]) > AC_SYS_LARGEFILE > =20 > +if test x"$host_kernel" =3D xlinux ; then I wonder if we should do it unconditionally. Large files support is really presumed by current code. Not for now, but something to keep in mind for next version. > + AC_CHECK_SIZEOF(off_t) > + test x"$ac_cv_sizeof_off_t" =3D x8 || AC_MSG_ERROR([Large file support= is required]) > +fi > + > # Identify characteristics of the host architecture. > unset ac_cv_c_bigendian > =20 > diff --git a/grub-core/osdep/unix/hostdisk.c b/grub-core/osdep/unix/hostd= isk.c > index 43b56ff..14cab1c 100644 > --- a/grub-core/osdep/unix/hostdisk.c > +++ b/grub-core/osdep/unix/hostdisk.c > @@ -48,11 +48,6 @@ > #ifdef __linux__ > # include /* ioctl */ > # include > -# if !defined(__GLIBC__) || \ > - ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__ < = 1))) > -/* Maybe libc doesn't have large file support. */ > -# include /* _llseek */ > -# endif /* (GLIBC < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR < 1)) = */ > #endif /* __linux__ */ > =20 > grub_uint64_t > @@ -79,24 +74,6 @@ grub_util_get_fd_size (grub_util_fd_t fd, const char *= name, unsigned *log_secsiz > return st.st_size; > } > =20 > -#if defined(__linux__) && (!defined(__GLIBC__) || \ > - ((__GLIBC__ < 2) || ((__GLIBC__ =3D=3D 2) && (__GLIBC_MINOR__ < = 1)))) > - /* Maybe libc doesn't have large file support. */ > -int > -grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off) > -{ > - loff_t offset, result; > - static int _llseek (uint filedes, ulong hi, ulong lo, > - loff_t *res, uint wh); > - _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo, > - loff_t *, res, uint, wh); > - > - offset =3D (loff_t) off; > - if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET)) > - return -1; > - return GRUB_ERR_NONE; > -} > -#else > int > grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t off) > { > @@ -107,8 +84,6 @@ grub_util_fd_seek (grub_util_fd_t fd, grub_uint64_t of= f) > =20 > return 0; > } > -#endif > - > =20 > /* Read LEN bytes from FD in BUF. Return less than or equal to zero if an > error occurs, otherwise return LEN. */