logo       

[PATCH] multipath-tools/kpartx - loop support: msg#00078

linux.kernel.device-mapper.devel

Subject: [PATCH] multipath-tools/kpartx - loop support

Hi Christophe

The following patches makes kpartx loop support buildable.

You can also pull this changes from
http://137.250.31.225/rsync/git/linux/storage/multipath-tools.git.

Bastian


Use kernel definition of __kernel_old_dev_t.

---
commit 283cc1fbbd7a212f1f18f1cc2a5cb0c2d3aebd9b
tree 14fc95286dd53aa21a2cd15fedd35f7488f26c45
parent 1d586d3a1a998b64fa27e61777478d8735d4152a
author Bastian Blank <waldi@xxxxxxxxxx> Thu, 29 Sep 2005 14:10:23 +0000
committer Bastian Blank <waldi@xxxxxxxxxx> Thu, 29 Sep 2005 14:10:23 +0000

kpartx/lopart.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)

diff --git a/kpartx/lopart.c b/kpartx/lopart.c
--- a/kpartx/lopart.c
+++ b/kpartx/lopart.c
@@ -27,17 +27,6 @@
#include <sys/mman.h>
#include <sysmacros.h>

-#if defined(__hppa__) || defined(__powerpc64__) || defined (__alpha__) \
- || defined (__x86_64__)
-typedef unsigned long __kernel_old_dev_t;
-#elif defined(__powerpc__) || defined(__ia64__)
-typedef unsigned int __kernel_old_dev_t;
-#else
-typedef unsigned short __kernel_old_dev_t;
-#endif
-
-#define dev_t __kernel_old_dev_t
-
#include <linux/loop.h>

#include "lopart.h"



!-------------------------------------------------------------flip-


Use C99 type uintptr_t.

---
commit 1dc2104b2a9a7db25dceaa37304abf83436813de
tree b81ec33c94cc0f5731bac9fd6eeec6134615c340
parent 283cc1fbbd7a212f1f18f1cc2a5cb0c2d3aebd9b
author Bastian Blank <waldi@xxxxxxxxxx> Thu, 29 Sep 2005 14:11:53 +0000
committer Bastian Blank <waldi@xxxxxxxxxx> Thu, 29 Sep 2005 14:11:53 +0000

kpartx/lopart.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/kpartx/lopart.c b/kpartx/lopart.c
--- a/kpartx/lopart.c
+++ b/kpartx/lopart.c
@@ -26,18 +26,14 @@
#include <sys/stat.h>
#include <sys/mman.h>
#include <sysmacros.h>
+#include <stdint.h>

#include <linux/loop.h>

#include "lopart.h"
#include "xstrncpy.h"

-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) \
- && !defined (__s390x__)
-#define int2ptr(x) ((void *) ((int) x))
-#else
-#define int2ptr(x) ((void *) ((long) x))
-#endif
+#define int2ptr(x) ((void *) ((uintptr_t) x))

static char *
xstrdup (const char *s)



!-------------------------------------------------------------flip-



--
It would seem that evil retreats when forcibly confronted.
-- Yarnek of Excalbia, "The Savage Curtain", stardate 5906.5

Attachment: signature.asc
Description: Digital signature



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise