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
+1
View File
@@ -28,6 +28,7 @@ Features:
* Optimise font module printing (Windows)
* Detect pacman package count inside MSYS2 environment (Windows)
* Add Wifi / Battery module support for Android
* Disk name support for Linux
Logos:
* Raspbian (@IamNoRobot, #373)
+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);
}