This commit is contained in:
parent
60ffb71f7c
commit
56295b10e0
@ -63,7 +63,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void on_off (unsigned int value)
|
static void on_off (unsigned int value)
|
||||||
@@ -780,7 +786,7 @@
|
@@ -784,7 +790,7 @@
|
||||||
|
|
||||||
void process_dev (char *devname)
|
void process_dev (char *devname)
|
||||||
{
|
{
|
||||||
@ -72,7 +72,7 @@
|
|||||||
static long parm, multcount;
|
static long parm, multcount;
|
||||||
__u16 *id = (void *)-1;
|
__u16 *id = (void *)-1;
|
||||||
|
|
||||||
@@ -796,14 +802,18 @@
|
@@ -800,14 +806,18 @@
|
||||||
if (set_fsreadahead) {
|
if (set_fsreadahead) {
|
||||||
if (get_fsreadahead)
|
if (get_fsreadahead)
|
||||||
printf(" setting fs readahead to %d\n", fsreadahead);
|
printf(" setting fs readahead to %d\n", fsreadahead);
|
||||||
@ -93,7 +93,7 @@
|
|||||||
}
|
}
|
||||||
if (scan_hwif) {
|
if (scan_hwif) {
|
||||||
int args[3];
|
int args[3];
|
||||||
@@ -811,8 +821,10 @@
|
@@ -815,8 +825,10 @@
|
||||||
args[0] = hwif_data;
|
args[0] = hwif_data;
|
||||||
args[1] = hwif_ctrl;
|
args[1] = hwif_ctrl;
|
||||||
args[2] = hwif_irq;
|
args[2] = hwif_irq;
|
||||||
@ -105,7 +105,7 @@
|
|||||||
}
|
}
|
||||||
if (set_piomode) {
|
if (set_piomode) {
|
||||||
if (get_piomode) {
|
if (get_piomode) {
|
||||||
@@ -825,68 +837,86 @@
|
@@ -829,68 +841,86 @@
|
||||||
else
|
else
|
||||||
printf(" attempting to set UDMA mode to %d\n", (piomode-200));
|
printf(" attempting to set UDMA mode to %d\n", (piomode-200));
|
||||||
}
|
}
|
||||||
@ -201,7 +201,7 @@
|
|||||||
}
|
}
|
||||||
if (set_doorlock) {
|
if (set_doorlock) {
|
||||||
__u8 args[4] = {0,0,0,0};
|
__u8 args[4] = {0,0,0,0};
|
||||||
@@ -895,8 +925,10 @@
|
@@ -899,8 +929,10 @@
|
||||||
printf(" setting drive doorlock to %d", doorlock);
|
printf(" setting drive doorlock to %d", doorlock);
|
||||||
on_off(doorlock);
|
on_off(doorlock);
|
||||||
}
|
}
|
||||||
@ -213,7 +213,7 @@
|
|||||||
}
|
}
|
||||||
if (set_dkeep) {
|
if (set_dkeep) {
|
||||||
/* lock/unlock the drive's "feature" settings */
|
/* lock/unlock the drive's "feature" settings */
|
||||||
@@ -906,24 +938,30 @@
|
@@ -910,24 +942,30 @@
|
||||||
on_off(dkeep);
|
on_off(dkeep);
|
||||||
}
|
}
|
||||||
args[2] = dkeep ? 0x66 : 0xcc;
|
args[2] = dkeep ? 0x66 : 0xcc;
|
||||||
@ -247,7 +247,7 @@
|
|||||||
}
|
}
|
||||||
if (set_xfermode) {
|
if (set_xfermode) {
|
||||||
__u8 args[4] = {ATA_OP_SETFEATURES,0,3,0};
|
__u8 args[4] = {ATA_OP_SETFEATURES,0,3,0};
|
||||||
@@ -932,8 +970,10 @@
|
@@ -936,8 +974,10 @@
|
||||||
printf(" setting xfermode to %d", xfermode_requested);
|
printf(" setting xfermode to %d", xfermode_requested);
|
||||||
interpret_xfermode(xfermode_requested);
|
interpret_xfermode(xfermode_requested);
|
||||||
}
|
}
|
||||||
@ -259,7 +259,7 @@
|
|||||||
}
|
}
|
||||||
if (set_lookahead) {
|
if (set_lookahead) {
|
||||||
__u8 args[4] = {ATA_OP_SETFEATURES,0,0,0};
|
__u8 args[4] = {ATA_OP_SETFEATURES,0,0,0};
|
||||||
@@ -942,8 +982,10 @@
|
@@ -946,8 +986,10 @@
|
||||||
printf(" setting drive read-lookahead to %d", lookahead);
|
printf(" setting drive read-lookahead to %d", lookahead);
|
||||||
on_off(lookahead);
|
on_off(lookahead);
|
||||||
}
|
}
|
||||||
@ -271,7 +271,7 @@
|
|||||||
}
|
}
|
||||||
if (set_powerup_in_standby) {
|
if (set_powerup_in_standby) {
|
||||||
__u8 args[4] = {ATA_OP_SETFEATURES,0,0,0};
|
__u8 args[4] = {ATA_OP_SETFEATURES,0,0,0};
|
||||||
@@ -978,14 +1020,18 @@
|
@@ -982,14 +1024,18 @@
|
||||||
if (get_apmmode)
|
if (get_apmmode)
|
||||||
printf(" 0x%02x (%d)\n",apmmode,apmmode);
|
printf(" 0x%02x (%d)\n",apmmode,apmmode);
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@
|
|||||||
}
|
}
|
||||||
if (set_acoustic) {
|
if (set_acoustic) {
|
||||||
__u8 args[4];
|
__u8 args[4];
|
||||||
@@ -995,8 +1041,10 @@
|
@@ -999,8 +1045,10 @@
|
||||||
args[1] = acoustic;
|
args[1] = acoustic;
|
||||||
args[2] = acoustic ? 0x42 : 0xc2;
|
args[2] = acoustic ? 0x42 : 0xc2;
|
||||||
args[3] = 0;
|
args[3] = 0;
|
||||||
@ -304,7 +304,7 @@
|
|||||||
}
|
}
|
||||||
if (set_wcache) {
|
if (set_wcache) {
|
||||||
__u8 flushcache1[4] = {ATA_OP_FLUSHCACHE,0,0,0};
|
__u8 flushcache1[4] = {ATA_OP_FLUSHCACHE,0,0,0};
|
||||||
@@ -1009,11 +1057,16 @@
|
@@ -1013,11 +1061,16 @@
|
||||||
}
|
}
|
||||||
if (!wcache && do_drive_cmd(fd, flushcache1))
|
if (!wcache && do_drive_cmd(fd, flushcache1))
|
||||||
perror (" HDIO_DRIVE_CMD(flushcache1) failed");
|
perror (" HDIO_DRIVE_CMD(flushcache1) failed");
|
||||||
@ -324,7 +324,7 @@
|
|||||||
}
|
}
|
||||||
if (set_standbynow) {
|
if (set_standbynow) {
|
||||||
__u8 args1[4] = {ATA_OP_STANDBYNOW1,0,0,0};
|
__u8 args1[4] = {ATA_OP_STANDBYNOW1,0,0,0};
|
||||||
@@ -1021,8 +1074,10 @@
|
@@ -1025,8 +1078,10 @@
|
||||||
if (get_standbynow)
|
if (get_standbynow)
|
||||||
printf(" issuing standby command\n");
|
printf(" issuing standby command\n");
|
||||||
if (do_drive_cmd(fd, args1)
|
if (do_drive_cmd(fd, args1)
|
||||||
@ -336,7 +336,7 @@
|
|||||||
}
|
}
|
||||||
if (set_sleepnow) {
|
if (set_sleepnow) {
|
||||||
__u8 args1[4] = {ATA_OP_SLEEPNOW1,0,0,0};
|
__u8 args1[4] = {ATA_OP_SLEEPNOW1,0,0,0};
|
||||||
@@ -1030,8 +1085,10 @@
|
@@ -1034,8 +1089,10 @@
|
||||||
if (get_sleepnow)
|
if (get_sleepnow)
|
||||||
printf(" issuing sleep command\n");
|
printf(" issuing sleep command\n");
|
||||||
if (do_drive_cmd(fd, args1)
|
if (do_drive_cmd(fd, args1)
|
||||||
@ -348,7 +348,7 @@
|
|||||||
}
|
}
|
||||||
if (set_security) {
|
if (set_security) {
|
||||||
do_set_security(fd);
|
do_set_security(fd);
|
||||||
@@ -1039,15 +1096,19 @@
|
@@ -1043,15 +1100,19 @@
|
||||||
if (set_freeze) {
|
if (set_freeze) {
|
||||||
__u8 args[4] = {ATA_OP_SECURITY_FREEZE_LOCK,0,0,0};
|
__u8 args[4] = {ATA_OP_SECURITY_FREEZE_LOCK,0,0,0};
|
||||||
printf(" issuing Security Freeze command\n");
|
printf(" issuing Security Freeze command\n");
|
||||||
@ -370,7 +370,7 @@
|
|||||||
}
|
}
|
||||||
if (set_standby) {
|
if (set_standby) {
|
||||||
__u8 args[4] = {ATA_OP_SETIDLE1,standby,0,0};
|
__u8 args[4] = {ATA_OP_SETIDLE1,standby,0,0};
|
||||||
@@ -1055,14 +1116,18 @@
|
@@ -1059,14 +1120,18 @@
|
||||||
printf(" setting standby to %u", standby);
|
printf(" setting standby to %u", standby);
|
||||||
interpret_standby();
|
interpret_standby();
|
||||||
}
|
}
|
||||||
@ -389,9 +389,9 @@
|
|||||||
perror(" HDIO_SET_BUSSTATE failed");
|
perror(" HDIO_SET_BUSSTATE failed");
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
if (get_hitachi_temp) {
|
if (do_drq_hsm_error) {
|
||||||
__u8 args[4] = {0xf0,0,0x01,0}; /* "Sense Condition", vendor-specific */
|
id = get_identify_data(fd, id);
|
||||||
@@ -1104,12 +1169,18 @@
|
@@ -1122,12 +1187,18 @@
|
||||||
break;
|
break;
|
||||||
default:printf("\?\?\?)\n");
|
default:printf("\?\?\?)\n");
|
||||||
}
|
}
|
||||||
@ -410,7 +410,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1120,6 +1191,9 @@
|
@@ -1138,6 +1209,9 @@
|
||||||
printf(" (DMA-Assisted-PIO)\n");
|
printf(" (DMA-Assisted-PIO)\n");
|
||||||
else
|
else
|
||||||
on_off(parm);
|
on_off(parm);
|
||||||
@ -420,7 +420,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (get_dma_q) {
|
if (get_dma_q) {
|
||||||
@@ -1134,28 +1208,34 @@
|
@@ -1152,28 +1226,34 @@
|
||||||
if (0 == ioctl(fd, HDIO_GET_KEEPSETTINGS, &parm)) {
|
if (0 == ioctl(fd, HDIO_GET_KEEPSETTINGS, &parm)) {
|
||||||
printf(" keepsettings = %2ld", parm);
|
printf(" keepsettings = %2ld", parm);
|
||||||
on_off(parm);
|
on_off(parm);
|
||||||
@ -461,7 +461,7 @@
|
|||||||
printf(" readahead = %2ld", parm);
|
printf(" readahead = %2ld", parm);
|
||||||
on_off(parm);
|
on_off(parm);
|
||||||
}
|
}
|
||||||
@@ -1170,12 +1250,13 @@
|
@@ -1188,12 +1268,13 @@
|
||||||
static struct hd_geometry g;
|
static struct hd_geometry g;
|
||||||
static struct local_hd_big_geometry bg;
|
static struct local_hd_big_geometry bg;
|
||||||
|
|
||||||
@ -478,15 +478,20 @@
|
|||||||
printf(msg, g.cylinders, g.heads, g.sectors, blksize, g.start);
|
printf(msg, g.cylinders, g.heads, g.sectors, blksize, g.start);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1185,6 +1266,7 @@
|
@@ -1202,9 +1283,10 @@
|
||||||
|
const char *state;
|
||||||
if (do_drive_cmd(fd, args)
|
if (do_drive_cmd(fd, args)
|
||||||
&& (args[0] = ATA_OP_CHECKPOWERMODE2) /* (single =) try again with 0x98 */
|
&& (args[0] = ATA_OP_CHECKPOWERMODE2) /* (single =) try again with 0x98 */
|
||||||
&& do_drive_cmd(fd, args)) {
|
- && do_drive_cmd(fd, args))
|
||||||
|
+ && do_drive_cmd(fd, args)) {
|
||||||
+ err = errno;
|
+ err = errno;
|
||||||
if (errno != EIO || args[0] != 0 || args[1] != 0)
|
state = "unknown";
|
||||||
state = "unknown";
|
- else
|
||||||
else
|
+ } else
|
||||||
@@ -1205,8 +1287,10 @@
|
state = (args[2] == 255) ? "active/idle" : "standby";
|
||||||
|
printf(" drive state is: %s\n", state);
|
||||||
|
}
|
||||||
|
@@ -1219,8 +1301,10 @@
|
||||||
dump_identity(id2);
|
dump_identity(id2);
|
||||||
} else if (errno == -ENOMSG)
|
} else if (errno == -ENOMSG)
|
||||||
printf(" no identification info available\n");
|
printf(" no identification info available\n");
|
||||||
@ -498,7 +503,7 @@
|
|||||||
}
|
}
|
||||||
if (do_IDentity) {
|
if (do_IDentity) {
|
||||||
id = get_identify_data(fd, id);
|
id = get_identify_data(fd, id);
|
||||||
@@ -1259,39 +1343,46 @@
|
@@ -1273,39 +1357,46 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (get_busstate) {
|
if (get_busstate) {
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:03ba38f464ad1be1f3574ea2d0893d1aaef9251fc35e383756a20d4d835ff8a9
|
|
||||||
size 55061
|
|
3
hdparm-7.2.tar.bz2
Normal file
3
hdparm-7.2.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0f283ac9ca09900c2b907a3a4dd3c296daa9e89853d385423420ab5b3044ac58
|
||||||
|
size 55285
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 29 21:57:26 CEST 2007 - ro@suse.de
|
||||||
|
|
||||||
|
- update to 7.2
|
||||||
|
- tweak -C
|
||||||
|
- added more debug info from --verbose
|
||||||
|
- added --drq-hsm-error to test libata EH (VERY DANGEROUS, do not use)
|
||||||
|
- fixed breakage when used with old IDE driver
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Apr 29 11:50:34 CEST 2007 - ro@suse.de
|
Sun Apr 29 11:50:34 CEST 2007 - ro@suse.de
|
||||||
|
|
||||||
|
10
hdparm.spec
10
hdparm.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package hdparm (Version 7.1)
|
# spec file for package hdparm (Version 7.2)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
@ -16,7 +16,7 @@ Group: Hardware/Other
|
|||||||
PreReq: %insserv_prereq %fillup_prereq coreutils
|
PreReq: %insserv_prereq %fillup_prereq coreutils
|
||||||
Provides: base:/sbin/hdparm
|
Provides: base:/sbin/hdparm
|
||||||
Autoreqprov: on
|
Autoreqprov: on
|
||||||
Version: 7.1
|
Version: 7.2
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: A Program to Get and Set Hard Disk Parameters
|
Summary: A Program to Get and Set Hard Disk Parameters
|
||||||
Source: hdparm-%{version}.tar.bz2
|
Source: hdparm-%{version}.tar.bz2
|
||||||
@ -103,6 +103,12 @@ fi
|
|||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Apr 29 2007 - ro@suse.de
|
* Sun Apr 29 2007 - ro@suse.de
|
||||||
|
- update to 7.2
|
||||||
|
- tweak -C
|
||||||
|
- added more debug info from --verbose
|
||||||
|
- added --drq-hsm-error to test libata EH (VERY DANGEROUS, do not use)
|
||||||
|
- fixed breakage when used with old IDE driver
|
||||||
|
* Sun Apr 29 2007 - ro@suse.de
|
||||||
- update to 7.1
|
- update to 7.1
|
||||||
- big-endian fixes for -I, --Istdin, --Istdout
|
- big-endian fixes for -I, --Istdin, --Istdout
|
||||||
- cody tidying in sgio.c
|
- cody tidying in sgio.c
|
||||||
|
Loading…
Reference in New Issue
Block a user