forked from pool/hdparm
Dirk Mueller
4fc5cbeae0
- Update to 9.57: * Added --set-sector-size flag, used to change logical sector size for drives which support multiple sector sizes. * Also updated various bits of hdparm to better cope with non-512 byte sectors. * Various other minor fixes/enhancements. - Update hdparm-leak-fix.patch OBS-URL: https://build.opensuse.org/request/show/642808 OBS-URL: https://build.opensuse.org/package/show/Base:System/hdparm?expand=0&rev=88
22 lines
655 B
Diff
22 lines
655 B
Diff
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;
|
|
__u64 start_lba;
|
|
int i, err, shortened = 0;
|
|
- char *fdevname = strdup(devname);
|
|
+ char *fdevname = strdupa(devname);
|
|
|
|
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 @@
|
|
}
|
|
|
|
if (!shortened)
|
|
- fdevname = strdup("the full disk");
|
|
+ fdevname = strdupa("the full disk");
|
|
|
|
if (start_lba == 0ULL)
|
|
return 0;
|