aboutsummaryrefslogtreecommitdiffstats
path: root/disk-utils/fdformat.c
diff options
context:
space:
mode:
authorKarel Zak <kzak@redhat.com>2006-12-07 00:25:44 +0100
committerKarel Zak <kzak@redhat.com>2006-12-07 00:25:44 +0100
commit66ee8158b69525e12060ef558cb5d77feadab1dc (patch)
tree08b30f2d07df9213f5647bc6f60b5090a263ef43 /disk-utils/fdformat.c
parent22853e4a82c6ef7b336527529acb94b14a0b0fd8 (diff)
downloadutil-linux-66ee8158b69525e12060ef558cb5d77feadab1dc.tar.gz
Imported from util-linux-2.10s tarball.v2.10s
Diffstat (limited to 'disk-utils/fdformat.c')
-rw-r--r--disk-utils/fdformat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c
index 0251e34404..b4aec0076b 100644
--- a/disk-utils/fdformat.c
+++ b/disk-utils/fdformat.c
@@ -1,4 +1,4 @@
-/* fdformat.c - Low-level formats a floppy disk. */
+/* fdformat.c - Low-level formats a floppy disk - Werner Almesberger */
/* 1999-02-22 Arkadiusz Mi�kiewicz <misiek@misiek.eu.org>
* - added Native Language Support
@@ -135,11 +135,11 @@ int main(int argc,char **argv)
exit(1);
}
if (access(argv[1],W_OK) < 0) PERROR(argv[1]);
- if ((ctrl = open(argv[1],3)) < 0) PERROR(argv[1]);
+ if ((ctrl = open(argv[1],O_WRONLY)) < 0) PERROR(argv[1]);
if (ioctl(ctrl,FDGETPRM,(long) &param) < 0)
PERROR(_("Could not determine current format type"));
printf(_("%s-sided, %d tracks, %d sec/track. Total capacity %d kB.\n"),
- param.head ? _("Double") : _("Single"),
+ (param.head == 2) ? _("Double") : _("Single"),
param.track, param.sect,param.size >> 1);
format_disk(argv[1]);
if (verify) verify_disk(argv[1]);