mirror of
https://github.com/aaru-dps/aaruremote.git
synced 2025-12-16 19:24:37 +00:00
Find period delimiter when sysfs device symlink target lacks a colon.
This commit is contained in:
@@ -242,7 +242,14 @@ int32_t GetDeviceType(void* device_ctx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
chrptr = strchr(dev_path, ':') - 1;
|
chrptr = strchr(dev_path, ':');
|
||||||
|
|
||||||
|
if(!chrptr)
|
||||||
|
{
|
||||||
|
chrptr = strrchr(dev_path, '.');
|
||||||
|
}
|
||||||
|
|
||||||
|
chrptr--;
|
||||||
|
|
||||||
while(chrptr != dev_path)
|
while(chrptr != dev_path)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user