1
2
3
4
5
6
7
8
9
10
11
12
13
14 | diff --git a/libparted/labels/fdasd.c b/libparted/labels/fdasd.c
index 7e6a77a..c810ef4 100644
--- a/libparted/labels/fdasd.c
+++ b/libparted/labels/fdasd.c
@@ -1021,7 +1021,8 @@ fdasd_get_geometry (const PedDevice *dev, fdasd_anchor_t *anc, int f)
goto error;
}
- if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0)
+ if (ioctl(f, HDIO_GETGEO, &anc->geo) != 0 ||
+ !anc->geo.sectors || !anc->geo.heads)
fdasd_error(anc, unable_to_ioctl,
_("Could not retrieve disk geometry information."));
|