From 63cccae4684f83d2a462bc8abf24e51d1bd6efb6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 7 Dec 2006 00:25:58 +0100 Subject: Imported from util-linux-2.11t tarball. --- disk-utils/fdformat.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'disk-utils/fdformat.c') diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c index e479059c3..e1b381173 100644 --- a/disk-utils/fdformat.c +++ b/disk-utils/fdformat.c @@ -18,12 +18,8 @@ #include "nls.h" -/* cannot include */ -#define MAJOR(a) ((a)>>8) - struct floppy_struct param; -#define FLOPPY_MAJOR 2 #define SECTOR_SIZE 512 #define PERROR(msg) { perror(msg); exit(1); } @@ -130,9 +126,10 @@ int main(int argc,char **argv) } if (argc != 2) usage(progname); if (stat(argv[1],&st) < 0) PERROR(argv[1]); - if (!S_ISBLK(st.st_mode) || MAJOR(st.st_rdev) != FLOPPY_MAJOR) { - fprintf(stderr,_("%s: not a floppy device\n"),argv[1]); + if (!S_ISBLK(st.st_mode)) { + fprintf(stderr,_("%s: not a block device\n"),argv[1]); exit(1); + /* do not test major - perhaps this was an USB floppy */ } if (access(argv[1],W_OK) < 0) PERROR(argv[1]); -- cgit v1.2.3-55-g7522