All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] unix/getroot: remove unused MAJOR definition
@ 2015-11-07  6:44 Andrei Borzenkov
  2015-11-07 13:43 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Borzenkov @ 2015-11-07  6:44 UTC (permalink / raw)
  To: grub-devel

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 <sys/ioctl.h>         /* ioctl */
 #include <sys/mount.h>
-#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 <grub/emu/getroot.h>
 
 #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 <util.h>    /* getrawpartition */
 # endif /* HAVE_GETRAWPARTITION */
-- 
tg: (1018e91..) u/kill-MAJOR (depends on: master)


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] unix/getroot: remove unused MAJOR definition
  2015-11-07  6:44 [PATCH] unix/getroot: remove unused MAJOR definition Andrei Borzenkov
@ 2015-11-07 13:43 ` Vladimir 'phcoder' Serbinenko
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2015-11-07 13:43 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 1582 bytes --]

Go ahead
Le 7 nov. 2015 7:45 AM, "Andrei Borzenkov" <arvidjaar@gmail.com> a écrit :

> 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 <sys/ioctl.h>         /* ioctl */
>  #include <sys/mount.h>
> -#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 <grub/emu/getroot.h>
>
>  #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 <util.h>    /* 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
>

[-- Attachment #2: Type: text/html, Size: 2113 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-07 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-07  6:44 [PATCH] unix/getroot: remove unused MAJOR definition Andrei Borzenkov
2015-11-07 13:43 ` Vladimir 'phcoder' Serbinenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.