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

This commit is contained in:
Linus Dierheimer committed 2023-01-21 14:57:30 +01:00
1 parent 7edc715cba
commit c15f55762d
2 files changed
+5

No files matched your search

+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);
}