Blame SOURCES/hdparm-9.43-get_geom.patch
|
Justin Vreeland |
b79474 |
Index: hdparm-9.43/geom.c
|
|
Justin Vreeland |
b79474 |
===================================================================
|
|
Justin Vreeland |
b79474 |
--- hdparm-9.43.orig/geom.c
|
|
Justin Vreeland |
b79474 |
+++ hdparm-9.43/geom.c
|
|
Justin Vreeland |
b79474 |
@@ -201,7 +201,7 @@ int get_dev_geometry (int fd, __u32 *cyl
|
|
Justin Vreeland |
b79474 |
__u64 hs = (*heads) * (*sects);
|
|
Justin Vreeland |
b79474 |
__u64 cyl = (*cyls);
|
|
Justin Vreeland |
b79474 |
__u64 chs = cyl * hs;
|
|
Justin Vreeland |
b79474 |
- if (chs < (*nsectors))
|
|
Justin Vreeland |
b79474 |
+ if (chs < (*nsectors) && hs)
|
|
Justin Vreeland |
b79474 |
*cyls = (*nsectors) / hs;
|
|
Justin Vreeland |
b79474 |
}
|
|
Justin Vreeland |
b79474 |
}
|