Skip to content

Some removable drives are part of statistic alerted because 100% full #49

@o1e9

Description

@o1e9

Hi,

It looks like some devices may be recognized as flash drives however those are license dongles for example and read-only with no disk space left. It creates problems in statistics reporting DISK red because some disks are full.

I have found lines in DiskPlugin related to it:

DiskMuninNodePlugin::DiskMuninNodePlugin()
{
int i;
for (i = 0; i < 32; i++) {
drives[i][0] = NULL;
}
i = 0;
for (int d = 'A'; d <= 'Z'; d++) {
drives[i][0] = d;
drives[i][1] = ':';
drives[i][2] = NULL;//'';
drives[i][3] = NULL;
if (GetDriveTypeA(drives[i]) != DRIVE_FIXED) {
// Remove it
drives[i][0] = NULL;
} else {
i++;
}
}
}

Shall it be like:

if (GetDriveTypeA(drives[i]) != DRIVE_FIXED || GetDriveTypeA(drives[i]) != DRIVE_REMOVABLE) {

So to check explicitly for removable disk drive.

Thank you,
Oleg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions