3553bfaa70
The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/hdparm#63bf783c5a54d03e5c88f466ef40844b3a82f329
14 lines
394 B
Diff
14 lines
394 B
Diff
Index: hdparm-9.43/geom.c
|
|
===================================================================
|
|
--- hdparm-9.43.orig/geom.c
|
|
+++ hdparm-9.43/geom.c
|
|
@@ -201,7 +201,7 @@ int get_dev_geometry (int fd, __u32 *cyl
|
|
__u64 hs = (*heads) * (*sects);
|
|
__u64 cyl = (*cyls);
|
|
__u64 chs = cyl * hs;
|
|
- if (chs < (*nsectors))
|
|
+ if (chs < (*nsectors) && hs)
|
|
*cyls = (*nsectors) / hs;
|
|
}
|
|
}
|