Репозитории ALT
S: | 9.62-alt1 |
D: | 8.7-alt0.1 |
5.1: | 9.33-alt1 |
4.1: | 7.7-alt1 |
4.0: | 7.7-alt1 |
3.0: | 5.8-alt1 |
Группа :: Система/Ядро и оборудование
Пакет: hdparm
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: hdparm-9.62-alt1.patch
Скачать
Скачать
geom.c | 2 +-
hdparm.c | 2 +-
sysconfig | 36 ++++++++++++++++++++++++++++++++++++
3 files changed, 38 insertions(+), 2 deletions(-)
diff --git a/geom.c b/geom.c
index 3241ed0..c642f48 100644
--- a/geom.c
+++ b/geom.c
@@ -207,7 +207,7 @@ int get_dev_geometry (int fd, __u32 *cyls, __u32 *heads, __u32 *sects,
__u64 hs = (*heads) * (*sects);
__u64 cyl = (*cyls);
__u64 chs = cyl * hs;
- if (chs < (*nsectors))
+ if (chs < (*nsectors) && hs)
*cyls = (*nsectors) / hs;
}
}
diff --git a/hdparm.c b/hdparm.c
index 0af6a5a..926174d 100644
--- a/hdparm.c
+++ b/hdparm.c
@@ -5,7 +5,7 @@
#define HDPARM_VERSION "v9.62"
#define _LARGEFILE64_SOURCE /*for lseek64*/
-#define _BSD_SOURCE /* for strtoll() */
+#define _DEFAULT_SOURCE /* for strtoll() */
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
diff --git a/sysconfig b/sysconfig
new file mode 100644
index 0000000..a2b4232
--- /dev/null
+++ b/sysconfig
@@ -0,0 +1,36 @@
+# These options are used to tune the hard drives -
+# read the hdparm man page for more information
+
+# Set this to 1 to enable DMA. This might cause some
+# data corruption on certain chipset / hard drive
+# combinations. This is used with the "-d" option
+
+# USE_DMA=1
+
+# Multiple sector I/O. a feature of most modern IDE hard drives,
+# permitting the transfer of multiple sectors per I/O interrupt,
+# rather than the usual one sector per interrupt. When this feature
+# is enabled, it typically reduces operating system overhead for disk
+# I/O by 30-50%. On many systems, it also provides increased data
+# throughput of anywhere from 5% to 50%. Some drives, however (most
+# notably the WD Caviar series), seem to run slower with multiple mode
+# enabled. Under rare circumstances, such failures can result in
+# massive filesystem corruption. USE WITH CAUTION AND BACKUP.
+# This is the sector count for multiple sector I/O - the "-m" option
+#
+# MULTIPLE_IO=16
+
+# (E)IDE 32-bit I/O support (to interface card)
+#
+# EIDE_32BIT=3
+
+# Enable drive read-lookahead
+#
+# LOOKAHEAD=1
+
+# Add extra parameters here if wanted
+# On reasonably new hardware, you may want to try -X66, -X67 or -X68
+# Other flags you might want to experiment with are -u1, -a and -m
+# See the hdparm manpage (man hdparm) for details and more options.
+#
+EXTRA_PARAMS=