Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions ras-diskerror-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@
#include "ras-report.h"


#define KERNEL_DEVICE_ID_BITS 20
#define KERNEL_DEVICE_ID_MASK ((1U << KERNEL_DEVICE_ID_BITS) - 1)
static unsigned int major(dev_t devid)
{
return (unsigned int)(devid >> KERNEL_DEVICE_ID_BITS);
}
static unsigned int minor(dev_t devid)
{
return (unsigned int)(devid & KERNEL_DEVICE_ID_MASK);
}

static const struct {
int error;
const char *name;
Expand Down