From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Zv3lu-0007oP-24 for mharc-grub-devel@gnu.org; Sat, 07 Nov 2015 08:43:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv3lr-0007nZ-8l for grub-devel@gnu.org; Sat, 07 Nov 2015 08:43:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zv3lq-000757-0x for grub-devel@gnu.org; Sat, 07 Nov 2015 08:43:07 -0500 Received: from mail-wm0-x231.google.com ([2a00:1450:400c:c09::231]:33200) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zv3lp-000751-OA for grub-devel@gnu.org; Sat, 07 Nov 2015 08:43:05 -0500 Received: by wmec201 with SMTP id c201so38959856wme.0 for ; Sat, 07 Nov 2015 05:43:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=rfikqGpIDPCJvFgV/3lKnMNdAYaPw8azYfhgYI6R2Ko=; b=K5AXYoarMWtf2ntBJ82nzLXtX9m/ZjssddHPprtB+u04fvG1SRDPBxC3caU6mOfafW 5xtVGZ/Wd7foC+y6OKS8uH+LHOg6/IxRljTNVAxhmtXFusg1hPRndACqRxgzw5hE4kXW biYy4qj+RgIM58ydn4d8vXojPF2+zjp4zC8eby+P98ew3FjipUPUWLLNGbVAkntNgqu4 C3p4L1V0P/XfHy1cuY5WXTtlWcB/qU5shkxRU39njRAnNHRNIlspjpK3jbggNBx6zPuk VAnVB+FwxQBENVc7h4M9Kc9YT2b0shTtD7G22R1HRU+1pbRd5qL/d5aYKZxq4uI+l8XW MCdA== MIME-Version: 1.0 X-Received: by 10.28.23.206 with SMTP id 197mr16797420wmx.88.1446903784848; Sat, 07 Nov 2015 05:43:04 -0800 (PST) Received: by 10.27.75.146 with HTTP; Sat, 7 Nov 2015 05:43:04 -0800 (PST) Received: by 10.27.75.146 with HTTP; Sat, 7 Nov 2015 05:43:04 -0800 (PST) In-Reply-To: <1446878694-31122-1-git-send-email-arvidjaar@gmail.com> References: <1446878694-31122-1-git-send-email-arvidjaar@gmail.com> Date: Sat, 7 Nov 2015 14:43:04 +0100 Message-ID: Subject: Re: [PATCH] unix/getroot: remove unused MAJOR definition From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: multipart/alternative; boundary=001a1146e1241ec3880523f38a88 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::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: Sat, 07 Nov 2015 13:43:08 -0000 --001a1146e1241ec3880523f38a88 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Go ahead Le 7 nov. 2015 7:45 AM, "Andrei Borzenkov" a =C3=A9cr= it : > We use major() everywhere, these definitions just add to confusion. > > --- > grub-core/osdep/unix/getroot.c | 8 -------- > 1 file changed, 8 deletions(-) > > diff --git a/grub-core/osdep/unix/getroot.c > b/grub-core/osdep/unix/getroot.c > index 14d483f..1079a91 100644 > --- a/grub-core/osdep/unix/getroot.c > +++ b/grub-core/osdep/unix/getroot.c > @@ -45,12 +45,6 @@ > #ifdef __linux__ > #include /* ioctl */ > #include > -#ifndef MAJOR > -# ifndef MINORBITS > -# define MINORBITS 8 > -# endif /* ! MINORBITS */ > -# define MAJOR(dev) ((unsigned) ((dev) >> MINORBITS)) > -#endif /* ! MAJOR */ > #ifndef FLOPPY_MAJOR > # define FLOPPY_MAJOR 2 > #endif /* ! FLOPPY_MAJOR */ > @@ -73,7 +67,6 @@ > #include > > #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) > -# define MAJOR(dev) major(dev) > # define FLOPPY_MAJOR 2 > #endif > > @@ -90,7 +83,6 @@ > #endif /* defined(__NetBSD__) || defined(__FreeBSD__) || > defined(__FreeBSD_kernel__) */ > > #if defined(__NetBSD__) || defined(__OpenBSD__) > -# define MAJOR(dev) major(dev) > # ifdef HAVE_GETRAWPARTITION > # include /* getrawpartition */ > # endif /* HAVE_GETRAWPARTITION */ > -- > tg: (1018e91..) u/kill-MAJOR (depends on: master) > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --001a1146e1241ec3880523f38a88 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Go ahead

Le=C2=A07 nov. 2015 7:45 AM, "Andrei Borzen= kov" <arvidjaar@gmail.com> a =C3=A9crit=C2=A0:
We use major() everywhere, these definitions just add to confusion.
---
=C2=A0grub-core/osdep/unix/getroot.c | 8 --------
=C2=A01 file changed, 8 deletions(-)

diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.= c
index 14d483f..1079a91 100644
--- a/grub-core/osdep/unix/getroot.c
+++ b/grub-core/osdep/unix/getroot.c
@@ -45,12 +45,6 @@
=C2=A0#ifdef __linux__
=C2=A0#include <sys/ioctl.h>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* ioct= l */
=C2=A0#include <sys/mount.h>
-#ifndef MAJOR
-# ifndef MINORBITS
-#=C2=A0 define MINORBITS=C2=A0 =C2=A0 8
-# endif /* ! MINORBITS */
-# define MAJOR(dev)=C2=A0 =C2=A0 ((unsigned) ((dev) >> MINORBITS)) -#endif /* ! MAJOR */
=C2=A0#ifndef FLOPPY_MAJOR
=C2=A0# define FLOPPY_MAJOR=C2=A0 2
=C2=A0#endif /* ! FLOPPY_MAJOR */
@@ -73,7 +67,6 @@
=C2=A0#include <grub/emu/getroot.h>

=C2=A0#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-# define MAJOR(dev) major(dev)
=C2=A0# define FLOPPY_MAJOR=C2=A0 2
=C2=A0#endif

@@ -90,7 +83,6 @@
=C2=A0#endif /* defined(__NetBSD__) || defined(__FreeBSD__) || defined(__Fr= eeBSD_kernel__) */

=C2=A0#if defined(__NetBSD__) || defined(__OpenBSD__)
-# define MAJOR(dev) major(dev)
=C2=A0# ifdef HAVE_GETRAWPARTITION
=C2=A0#=C2=A0 include <util.h>=C2=A0 =C2=A0 /* getrawpartition */
=C2=A0# endif /* HAVE_GETRAWPARTITION */
--
tg: (1018e91..) u/kill-MAJOR (depends on: master)

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
--001a1146e1241ec3880523f38a88--