108 lines
3.2 KiB
Diff
108 lines
3.2 KiB
Diff
From 2f0d94d200fb8822a9f8699e93b65c2d5476b087 Mon Sep 17 00:00:00 2001
|
|
From: Joel Granados Moreno <jgranado@redhat.com>
|
|
Date: Tue, 30 Jun 2009 16:21:02 +0200
|
|
Subject: [PATCH] The file include/parted/linux.h is needed by dasd.c
|
|
|
|
* include/parted/linux.h (PED_LINUX_H_INCLUDED, LINUX_SPECIFIC)
|
|
(LinuxSpecific, _LinuxSpecific, fd, dmtype, real_sector_size, anchor):
|
|
New file.
|
|
* libparted/arch/linux.c (PROC_DEVICES_BUFSIZ, LINUX_SPECIFIC)
|
|
(LinuxSpecific, RW_MODE, _LinuxSpecific, anchor, dmtype, fd)
|
|
(real_sector_size): User new header file.
|
|
---
|
|
include/parted/linux.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
|
|
libparted/arch/linux.c | 19 +------------------
|
|
2 files changed, 45 insertions(+), 18 deletions(-)
|
|
create mode 100644 include/parted/linux.h
|
|
|
|
diff --git a/include/parted/linux.h b/include/parted/linux.h
|
|
new file mode 100644
|
|
index 0000000..1a4171d
|
|
--- /dev/null
|
|
+++ b/include/parted/linux.h
|
|
@@ -0,0 +1,44 @@
|
|
+/*
|
|
+ libparted - a library for manipulating disk partitions
|
|
+ Copyright (C) 2001, 2007 Free Software Foundation, Inc.
|
|
+
|
|
+ This program is free software; you can redistribute it and/or modify
|
|
+ it under the terms of the GNU General Public License as published by
|
|
+ the Free Software Foundation; either version 3 of the License, or
|
|
+ (at your option) any later version.
|
|
+
|
|
+ This program is distributed in the hope that it will be useful,
|
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
+ GNU General Public License for more details.
|
|
+
|
|
+ You should have received a copy of the GNU General Public License
|
|
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
+*/
|
|
+
|
|
+#ifndef PED_LINUX_H_INCLUDED
|
|
+#define PED_LINUX_H_INCLUDED
|
|
+
|
|
+#include <parted/parted.h>
|
|
+#include <parted/device.h>
|
|
+
|
|
+#if defined(__s390__) || defined(__s390x__)
|
|
+# include <parted/fdasd.h>
|
|
+#endif
|
|
+
|
|
+#define LINUX_SPECIFIC(dev) ((LinuxSpecific*) (dev)->arch_specific)
|
|
+
|
|
+typedef struct _LinuxSpecific LinuxSpecific;
|
|
+
|
|
+struct _LinuxSpecific {
|
|
+ int fd;
|
|
+ char* dmtype; /**< device map target type */
|
|
+#if defined(__s390__) || defined(__s390x__)
|
|
+ unsigned int real_sector_size;
|
|
+ /* IBM internal dasd structure (i guess ;), required. */
|
|
+ struct fdasd_anchor *anchor;
|
|
+#endif
|
|
+};
|
|
+
|
|
+#endif /* PED_LINUX_H_INCLUDED */
|
|
+
|
|
diff --git a/libparted/arch/linux.c b/libparted/arch/linux.c
|
|
index 66fdd37..92c8f31 100644
|
|
--- a/libparted/arch/linux.c
|
|
+++ b/libparted/arch/linux.c
|
|
@@ -21,6 +21,7 @@
|
|
|
|
#include <parted/parted.h>
|
|
#include <parted/debug.h>
|
|
+#include <parted/linux.h>
|
|
|
|
#include <ctype.h>
|
|
#include <errno.h>
|
|
@@ -75,24 +76,6 @@
|
|
#define RW_MODE (O_RDWR)
|
|
#endif
|
|
|
|
-#if defined(__s390__) || defined(__s390x__)
|
|
-# include <parted/fdasd.h>
|
|
-#endif
|
|
-
|
|
-#define LINUX_SPECIFIC(dev) ((LinuxSpecific*) (dev)->arch_specific)
|
|
-
|
|
-typedef struct _LinuxSpecific LinuxSpecific;
|
|
-
|
|
-struct _LinuxSpecific {
|
|
- int fd;
|
|
- char* dmtype; /**< device map target type */
|
|
-#if defined(__s390__) || defined(__s390x__)
|
|
- unsigned int real_sector_size;
|
|
- /* IBM internal dasd structure (i guess ;), required. */
|
|
- struct fdasd_anchor *anchor;
|
|
-#endif
|
|
-};
|
|
-
|
|
struct hd_geometry {
|
|
unsigned char heads;
|
|
unsigned char sectors;
|
|
--
|
|
1.6.0.6
|
|
|