From: Andrei Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] unix/getroot: remove unused MAJOR definition
Date: Sat, 7 Nov 2015 09:44:54 +0300 [thread overview]
Message-ID: <1446878694-31122-1-git-send-email-arvidjaar@gmail.com> (raw)
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)
next reply other threads:[~2015-11-07 6:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-07 6:44 Andrei Borzenkov [this message]
2015-11-07 13:43 ` [PATCH] unix/getroot: remove unused MAJOR definition Vladimir 'phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446878694-31122-1-git-send-email-arvidjaar@gmail.com \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.