2018-10-23 09:14:51 +02:00
|
|
|
diff -urEbwB hdparm-9.57/hdparm.c hdparm-9.57.new/hdparm.c
|
|
|
|
--- hdparm-9.57/hdparm.c 2018-10-16 20:12:53.000000000 +0200
|
|
|
|
+++ hdparm-9.57.new/hdparm.c 2018-10-18 10:15:54.448809739 +0200
|
|
|
|
@@ -1197,7 +1197,7 @@
|
|
|
|
struct stat stat;
|
2009-09-21 21:04:36 +02:00
|
|
|
__u64 start_lba;
|
|
|
|
int i, err, shortened = 0;
|
|
|
|
- char *fdevname = strdup(devname);
|
|
|
|
+ char *fdevname = strdupa(devname);
|
|
|
|
|
2018-10-23 09:14:51 +02:00
|
|
|
if (0 == fstat(fd, &stat) && S_ISCHR(stat.st_mode))
|
|
|
|
return 0; /* skip geometry test for character (non-block) devices; eg. /dev/sg* */
|
|
|
|
@@ -1210,7 +1210,7 @@
|
2009-09-21 21:04:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!shortened)
|
|
|
|
- fdevname = strdup("the full disk");
|
|
|
|
+ fdevname = strdupa("the full disk");
|
|
|
|
|
|
|
|
if (start_lba == 0ULL)
|
|
|
|
return 0;
|