Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=661... Commit: 6616b37f2a68650112926c06973955dcd9fa4aa4 Parent: 5cf664ec4f1f08c110e14039b7945ee5d660f8fc Author: Jonathan Brassow jbrassow@redhat.com AuthorDate: Wed Sep 8 11:27:55 2010 -0500 Committer: Jonathan Brassow jbrassow@redhat.com CommitterDate: Wed Sep 8 11:27:55 2010 -0500
Using 'linux/kdev_t.h' for MAJOR/MINOR macros can cause wrong
device to be used/identified. --- cmirror/src/functions.c | 2 +- cmirror/src/kdev_t.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/cmirror/src/functions.c b/cmirror/src/functions.c index 45dcbb3..5536bbc 100644 --- a/cmirror/src/functions.c +++ b/cmirror/src/functions.c @@ -8,7 +8,7 @@ #include <signal.h> #include <ext2fs/ext2_fs.h> #include <ext2fs/ext2fs.h> -#include <linux/kdev_t.h> +#include "kdev_t.h" #define __USE_GNU /* for O_DIRECT */ #include <fcntl.h> #include <time.h> diff --git a/cmirror/src/kdev_t.h b/cmirror/src/kdev_t.h new file mode 100644 index 0000000..5fcda74 --- /dev/null +++ b/cmirror/src/kdev_t.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2004-2008 Red Hat, Inc. All rights reserved. + * + * This file is part of LVM2. + * + * This copyrighted material is made available to anyone wishing to use, + * modify, copy, or redistribute it subject to the terms and conditions + * of the GNU Lesser General Public License v.2.1. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#ifndef _LIBDM_KDEV_H +#define _LIBDM_KDEV_H + +#define MAJOR(dev) ((dev & 0xfff00) >> 8) +#define MINOR(dev) ((dev & 0xff) | ((dev >> 12) & 0xfff00)) +#define MKDEV(ma,mi) ((mi & 0xff) | (ma << 8) | ((mi & ~0xff) << 12)) + +#endif
cluster-commits@lists.fedorahosted.org