[BusyBox-cvs] busybox/util-linux fdformat.c,1.3,1.4
Erik Andersen
andersen at busybox.net
Sat Apr 3 12:36:06 UTC 2004
Update of /var/cvs/busybox/util-linux
In directory nail:/tmp/cvs-serv12089/util-linux
Modified Files:
fdformat.c
Log Message:
Everything should be made as simple as possible. But no simpler.
Index: fdformat.c
===================================================================
RCS file: /var/cvs/busybox/util-linux/fdformat.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- a/fdformat.c 20 Jan 2004 12:57:18 -0000 1.3
+++ b/fdformat.c 3 Apr 2004 12:36:03 -0000 1.4
@@ -107,12 +107,18 @@
bb_xioctl(fd, FDFMTBEG,NULL,"FDFMTBEG");
/* n == track */
- for (n = 0; n < param.track; n++) {
- descr.track = n;
- for(descr.head=0, print_and_flush("%3d\b\b\b", n) ; descr.head < param.head; descr.head++){
- bb_xioctl(fd,FDFMTTRK, &descr,"FDFMTTRK");
- }
+ for (n = 0; n < param.track; n++)
+ {
+ descr.head = 0;
+ descr.track = n;
+ bb_xioctl(fd, FDFMTTRK,&descr,"FDFMTTRK");
+ print_and_flush("%3d\b\b\b", n);
+ if (param.head == 2) {
+ descr.head = 1;
+ bb_xioctl(fd, FDFMTTRK,&descr,"FDFMTTRK");
+ }
}
+
bb_xioctl(fd,FDFMTEND,NULL,"FDFMTEND");
print_and_flush("done\n", NULL);
More information about the busybox-cvs
mailing list