Lines 35-42
Link Here
|
35 |
#include <string.h> |
35 |
#include <string.h> |
36 |
|
36 |
|
37 |
#ifdef HAVE_LINUX_FD_H |
37 |
#ifdef HAVE_LINUX_FD_H |
38 |
#include <linux/fd.h> |
38 |
#include <linux/fd.h> |
39 |
#include <linux/fs.h> |
39 |
#include <sys/sysmacros.h> |
40 |
#endif |
40 |
#endif |
41 |
|
41 |
|
42 |
#include "gfloppy.h" |
42 |
#include "gfloppy.h" |
Lines 579-585
Link Here
|
579 |
|
579 |
|
580 |
if (stat (device, &s) < 0) |
580 |
if (stat (device, &s) < 0) |
581 |
return GFLOPPY_NO_DEVICE; |
581 |
return GFLOPPY_NO_DEVICE; |
582 |
if (!S_ISBLK(s.st_mode) || MAJOR(s.st_rdev) != FLOPPY_MAJOR) |
582 |
if (!S_ISBLK(s.st_mode) || major(s.st_rdev) != FLOPPY_MAJOR) |
583 |
return GFLOPPY_NO_DEVICE; |
583 |
return GFLOPPY_NO_DEVICE; |
584 |
|
584 |
|
585 |
if (access (device, R_OK|W_OK) != 0) |
585 |
if (access (device, R_OK|W_OK) != 0) |