[Patch] Fix anaconda build on s390x with recent kernel headers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Proposed patch for

https://bugzilla.redhat.com/show_bug.cgi?id=520830

These structures are copied from the s390-utils package (GPLv2):



diff -urN anaconda-12.17/isys/dasd.c anaconda-12.17_dasd/isys/dasd.c
--- anaconda-12.17/isys/dasd.c  2009-08-07 12:00:11.000000000 -0400
+++ anaconda-12.17_dasd/isys/dasd.c     2009-09-02 11:44:46.000000000 -0400
@@ -29,6 +29,7 @@
 #include <linux/fs.h>

 #include "isys.h"
+#include "vtoc.h"

 #if defined(__s390__) || defined(__s390x__)
 #define u8 __u8
@@ -37,7 +38,6 @@
 #define u64 __u64
 #include <asm/vtoc.h>
 #include <asm/dasd.h>
-typedef struct vtoc_volume_label volume_label_t;
 #endif

 #if defined(__s390__) || defined(__s390x__)
diff -urN anaconda-12.17/isys/vtoc.h anaconda-12.17_vtocheader/isys/vtoc.h
--- anaconda-12.17/isys/vtoc.h  1969-12-31 19:00:00.000000000 -0500
+++ anaconda-12.17_vtocheader/isys/vtoc.h 2009-09-02 11:49:01.000000000 -0400
@@ -0,0 +1,42 @@
+
+#include <asm/dasd.h>
+#include <asm/vtoc.h>
+
+/* from s390-tools vtoc.h: */
+typedef struct cchhb
+{
+        u_int16_t cc;
+        u_int16_t hh;
+        u_int8_t b;
+} __attribute__ ((packed)) cchhb_t;
+/*
+ * The following structure is a merger of the cdl and ldl volume label.
+ * On an ldl disk there is no key information, so when reading an
+ * ldl label from disk, the data should be copied at the address of vollbl.
+ * On the other side, the field ldl_version is reserved in a cdl record
+ * and the field formatted_cyl exists only for ldl labels. So when
+ * reading a cdl label from disk, the formatted_cyl field will contain
+ * arbitrary data.
+ * This layout may be a bit awkward, but the advantage of having the
+ * same label type for both disk layout types is bigger than the effort
+ * for taking a bit of extra care at the fringes.
+ */
+typedef struct volume_label
+{
+ char volkey[4]; /* volume key = volume label */
+    char vollbl[4];         /* volume label                              */
+    char volid[6];          /* volume identifier                         */
+ u_int8_t security; /* security byte */
+    cchhb_t vtoc;           /* VTOC address                              */
+    char res1[5];           /* reserved                                  */
+ char cisize[4]; /* CI-size for FBA,... */ + /* ...blanks for CKD */
+    char blkperci[4];       /* no of blocks per CI (FBA), blanks for CKD */
+    char labperci[4];       /* no of labels per CI (FBA), blanks for CKD */
+    char res2[4];           /* reserved                                  */
+    char lvtoc[14];         /* owner code for LVTOC                      */
+    char res3[28];          /* reserved                                  */
+    char ldl_version;   /* version number, valid for ldl format      */
+    unsigned long long formatted_blocks; /* valid when ldl_version >= f2 */
+
+} __attribute__ ((packed)) volume_label_t;

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux