SHA256
1
0
forked from pool/hdparm
hdparm/hdparm-5.8-silence.patch

18 lines
536 B
Diff

--- hdparm.c
+++ hdparm.c
@@ -273,11 +273,10 @@
void flush_buffer_cache (int fd)
{
fsync (fd); /* flush buffers */
- if (ioctl(fd, BLKFLSBUF, NULL)) /* do it again, big time */
- perror("BLKFLSBUF failed");
+ ioctl(fd, BLKFLSBUF, NULL);
/* await completion */
- if (do_drive_cmd(fd, NULL) && errno != EINVAL && errno != ENOTTY && errno != ENOIOCTLCMD)
- perror("HDIO_DRIVE_CMD(null) (wait for flush complete) failed");
+ if (errno != EINVAL && errno != EOPNOTSUPP)
+ do_drive_cmd(fd, NULL);
}
int seek_to_zero (int fd)