mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Disk (BSD): try detecting disk label
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <sys/mount.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#include <sys/disklabel.h>
|
||||
|
||||
static void detectFsInfo(struct statfs* fs, FFDisk* disk)
|
||||
{
|
||||
if(
|
||||
@@ -21,6 +23,9 @@ static void detectFsInfo(struct statfs* fs, FFDisk* disk)
|
||||
disk->type = FF_DISK_TYPE_REGULAR_BIT;
|
||||
|
||||
ffStrbufInit(&disk->name);
|
||||
struct disklabel* lab = getdiskbyname(fs->f_mntfromname);
|
||||
if(lab)
|
||||
ffStrbufSetS(&disk->name, lab->d_packname);
|
||||
}
|
||||
#else
|
||||
void detectFsInfo(struct statfs* fs, FFDisk* disk);
|
||||
|
||||
Reference in New Issue
Block a user