Lines 52-58
Link Here
|
52 |
/* Determine device name, type, major and minor */ |
52 |
/* Determine device name, type, major and minor */ |
53 |
|
53 |
|
54 |
device_name = strrchr(path, '/') + 1; |
54 |
device_name = strrchr(path, '/') + 1; |
55 |
type = strncmp(path+5, "block/", 6) ? S_IFCHR : S_IFBLK; |
55 |
type = strstr(path+5, "block/") == NULL ? S_IFCHR : S_IFBLK; |
56 |
if (sscanf(temp, "%d:%d", &major, &minor) != 2) |
56 |
if (sscanf(temp, "%d:%d", &major, &minor) != 2) |
57 |
goto end; |
57 |
goto end; |
58 |
|
58 |
|