25 lines
703 B
Diff
25 lines
703 B
Diff
--- hdparm.c 2008-02-19 19:55:28.000000000 -0500
|
|
+++ hdparm.c 2008-02-20 10:35:43.000000000 -0500
|
|
@@ -25,7 +25,7 @@
|
|
|
|
extern const char *minor_str[];
|
|
|
|
-#define VERSION "v8.4"
|
|
+#define VERSION "v8.4+"
|
|
|
|
#ifndef O_DIRECT
|
|
#define O_DIRECT 040000 /* direct disk access, not easily obtained from headers */
|
|
@@ -159,10 +159,8 @@
|
|
sync();
|
|
if (ioctl(fd, BLKFLSBUF, NULL)) /* do it again, big time */
|
|
perror("BLKFLSBUF failed");
|
|
- sync();
|
|
- /* await completion */
|
|
- if (do_drive_cmd(fd, NULL) && errno != EINVAL && errno != ENOTTY && errno != ENOIOCTLCMD)
|
|
- perror("HDIO_DRIVE_CMD(null) (wait for flush complete) failed");
|
|
+ else
|
|
+ do_drive_cmd(fd, NULL); /* IDE: await completion */
|
|
sync();
|
|
}
|
|
|