Created attachment 8502 Diff of the change This patch extends the device path length from 64 to 128 characters. This allows support for device paths like /dev/disk/by-id/ata-WDC_WD10EZEX-00UD2A0_WD-WMC3F0097994-558987441145878.
Is 128 some upper limit? Shouldnt it be something like the max lenght of a directory entry? Why are those constants used all over the place, instead of sizeof()? If sizeof does not work, why not create a define? So much bike shedding...
Landry Breuil referenced this bugreport in commit 4db70a239601058e65859eabf8d8e524fa33d141 Allow for 128 chars device names (bug #15375) https://git.xfce.org/panel-plugins/xfce4-diskperf-plugin/commit?id=4db70a239601058e65859eabf8d8e524fa33d141
Bikeshedding without patches is not constructive, so i've just applied the provided patch :)
128 characters is no upper limit but just some arbitrary value I choose by doubling the existing limit. It worked for my use case and the increase was small enough as to probably not cause any issues. Using the "max lenght of a directory entry" will be quiet hard because, at least from my understanding, it heavily depends on the os and filesystem used. There are constants like PATH_MAX defined by POSIX, but it is discouraged to use them for memory allocation as their value can be undefined, arbitrarily high or even infinite. I do agree that it would be a good idea to reduce the number of constant values in favour of sizeof() or a self-defined constant. My lack of experience in hacking xfce (as well as c and gtk in general) however prevented me from confidently making such a change. So I was happy enough to get the desired result with changing a few numbers here and there.