#921 closed patch (fixed)
musl libc - canonicalize_file_name
Reported by: | tbk | Owned by: | Christian Franke |
---|---|---|---|
Priority: | minor | Milestone: | Release 7.0 |
Component: | all | Version: | 6.6 |
Keywords: | linux | Cc: |
Description
Hi there,
I tried to build the new version (6.6) on Alpine Linux, unfortenally canonicalize_file_name is not not part of musl's stdlib.
The issue was introduced in r4365:
[r4365] (108.2 kB) by chrfranke 2016-11-10 19:42:24 os_linux.cpp: Don't detect devices behind hpsa driver as regular SCSI devices. Suggest to use '-d cciss,N' instead. Based on patch provided by Stanislav Brabec.
https://sourceforge.net/p/smartmontools/code/4365/tree/trunk/smartmontools/os_linux.cpp
I have patched os_linux.cpp with the following to make it work:
--- a/os_linux.cpp +++ b/os_linux.cpp @@ -3176,7 +3176,7 @@ { char path[128]; snprintf(path, sizeof(path), "/sys/block/%s/device", name); - char * syshostpath = canonicalize_file_name(path); + char * syshostpath = realpath(path, NULL); if (!syshostpath) return false;
http://man7.org/linux/man-pages/man3/canonicalize_file_name.3.html
http://man7.org/linux/man-pages/man3/realpath.3.html
Attachments (1)
Change History (5)
by , 7 years ago
Attachment: | musl-canonicalize_file_name.patch added |
---|
comment:1 by , 7 years ago
Milestone: | → Release 6.7 |
---|---|
Owner: | set to |
Status: | new → accepted |
follow-up: 3 comment:2 by , 7 years ago
Keywords: | linux added |
---|---|
Resolution: | → fixed |
Status: | accepted → closed |
comment:3 by , 6 years ago
Your patch was OK, my commit r4603 wasn't. Now finally fixed in r4854, thanks to GH pull/23.
Note:
See TracTickets
for help on using tickets.
Fixed in r4603. Thanks.