diff options
author | Karel Zak | 2006-12-07 00:25:58 +0100 |
---|---|---|
committer | Karel Zak | 2006-12-07 00:25:58 +0100 |
commit | 63cccae4684f83d2a462bc8abf24e51d1bd6efb6 (patch) | |
tree | 433db3f0b44e0f46e4130141f4a59db9c3564557 /disk-utils/fdformat.c | |
parent | Imported from util-linux-2.11r tarball. (diff) | |
download | kernel-qcow2-util-linux-63cccae4684f83d2a462bc8abf24e51d1bd6efb6.tar.gz kernel-qcow2-util-linux-63cccae4684f83d2a462bc8abf24e51d1bd6efb6.tar.xz kernel-qcow2-util-linux-63cccae4684f83d2a462bc8abf24e51d1bd6efb6.zip |
Imported from util-linux-2.11t tarball.
Diffstat (limited to 'disk-utils/fdformat.c')
-rw-r--r-- | disk-utils/fdformat.c | 9 |
1 files changed, 3 insertions, 6 deletions
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 <linux/fs.h> */ -#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]); |