Disk(Linux): Use mountpoint as last fallback for disk name

This commit is contained in:
Linus Dierheimer
2023-01-21 14:57:30 +01:00
parent 7edc715cba
commit c15f55762d
2 changed files with 5 additions and 0 deletions
+4
View File
@@ -116,6 +116,10 @@ static void detectName(FFDisk* disk, const FFstrbuf* device)
detectNameFromPath(disk, &deviceStat, &basePath);
}
//Use the mountpoint as a last resort
if(disk->name.length == 0)
ffStrbufAppend(&disk->name, &disk->mountpoint);
ffStrbufDestroy(&basePath);
}