[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15349: [PATCH 10/19] libparted: mklabel to support EDEV DASD
From: |
Brian C. Lane |
Subject: |
bug#15349: [PATCH 10/19] libparted: mklabel to support EDEV DASD |
Date: |
Wed, 11 Sep 2013 12:25:00 -0700 |
From: Nageswara R Sastry <address@hidden>
Fixed Block Access (FBA) DASDs are mainframe-specific disk devices
which are layed out as a sequence of 512-byte sectors. This patch adds
support for mklabel to properly handle FBA devices.
Signed-off-by: Nageswara R Sastry <address@hidden>
---
libparted/labels/fdasd.c | 28 +++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)
diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
index 7de5f34..1f87937 100644
--- a/libparted/labels/fdasd.c
+++ b/libparted/labels/fdasd.c
@@ -870,19 +870,21 @@ fdasd_check_volume (fdasd_anchor_t *anc, int fd)
vtoc_read_volume_label (fd, anc->label_pos, v);
if (strncmp(v->vollbl, vtoc_ebcdic_enc ("VOL1", str, 4), 4) == 0) {
- /* found VOL1 volume label */
- b = (cchhb2blk (&v->vtoc, &anc->geo) - 1) * anc->blksize;
-
- if (b > 0) {
- int rc;
- rc = fdasd_valid_vtoc_pointer (anc, b, fd);
-
- if (rc < 0)
- return 1;
- else
- return 0;
- } else {
- fdasd_invalid_vtoc_pointer(anc);
+ if (anc->FBA_layout != 1 ) {
+ /* found VOL1 volume label */
+ b = (cchhb2blk (&v->vtoc, &anc->geo) - 1) *
anc->blksize;
+
+ if (b > 0) {
+ int rc;
+ rc = fdasd_valid_vtoc_pointer (anc, b, fd);
+
+ if (rc < 0)
+ return 1;
+ else
+ return 0;
+ } else {
+ fdasd_invalid_vtoc_pointer(anc);
+ }
}
} else if (strncmp (v->volkey, vtoc_ebcdic_enc ("LNX1", str, 4), 4) ==
0 ||
strncmp (v->volkey, vtoc_ebcdic_enc ("CMS1", str, 4), 4) ==
0) {
--
1.8.3.1
- bug#15356: [PATCH 00/19] Fedora parted patches, Brian C. Lane, 2013/09/11
- bug#15345: [PATCH 17/19] tests: Add btrfs and xfs to the fs probe test, Brian C. Lane, 2013/09/11
- bug#15346: [PATCH 01/19] libparted: copy pmbr_boot when duplicating GPT disk, Brian C. Lane, 2013/09/11
- bug#15347: [PATCH 18/19] libparted: Flush parent device on open (#962611), Brian C. Lane, 2013/09/11
- bug#15350: [PATCH 19/19] tests: Restrict gpt-header-munge to little-endian systems, Brian C. Lane, 2013/09/11
- bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/ paths (#872361), Brian C. Lane, 2013/09/11
- bug#15349: [PATCH 10/19] libparted: mklabel to support EDEV DASD,
Brian C. Lane <=
- bug#15353: [PATCH 12/19] tests: rewrite t6001 to use /dev/mapper, Brian C. Lane, 2013/09/11
- bug#15351: [PATCH 09/19] libparted: Avoid dasd as default disk type while probe, Brian C. Lane, 2013/09/11
- bug#15352: [PATCH 04/19] libparted: preserve the uuid on dm partitions (#832145), Brian C. Lane, 2013/09/11
- bug#15354: [PATCH 05/19] tests: Make sure dm UUIDs are not erased, Brian C. Lane, 2013/09/11
- bug#15355: [PATCH 02/19] tests: test creating 20 device-mapper partitions (#803108), Brian C. Lane, 2013/09/11
- bug#15356: [PATCH 03/19] libparted: use dm_udev_wait (#698121), Brian C. Lane, 2013/09/11
- bug#15356: [PATCH 08/19] libparted: mklabel to support EAV DASD, Brian C. Lane, 2013/09/11
- bug#15356: [PATCH 16/19] libparted: Recognize btrfs filesystem, Brian C. Lane, 2013/09/11
- bug#15356: [PATCH 06/19] libparted: add support for implicit FBA DASD partitions, Brian C. Lane, 2013/09/11
- bug#15356: [PATCH 14/19] libparted: Add UEFI System Partition flag., Brian C. Lane, 2013/09/11