2020-12-20 13:49:24 +01:00
|
|
|
Index: hdparm-9.60/hdparm.c
|
|
|
|
===================================================================
|
|
|
|
--- hdparm-9.60.orig/hdparm.c
|
|
|
|
+++ hdparm-9.60/hdparm.c
|
|
|
|
@@ -1199,7 +1199,7 @@ static int abort_if_not_full_device (int
|
|
|
|
struct stat st;
|
2009-09-21 21:04:36 +02:00
|
|
|
__u64 start_lba;
|
|
|
|
int i, err, shortened = 0;
|
|
|
|
- char *fdevname = strdup(devname);
|
|
|
|
+ char *fdevname = strdupa(devname);
|
|
|
|
|
2020-12-20 13:49:24 +01:00
|
|
|
if (0 == fstat(fd, &st) && S_ISCHR(st.st_mode))
|
2018-10-23 09:14:51 +02:00
|
|
|
return 0; /* skip geometry test for character (non-block) devices; eg. /dev/sg* */
|
2020-12-20 13:49:24 +01:00
|
|
|
@@ -1212,7 +1212,7 @@ static int abort_if_not_full_device (int
|
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;
|