Changeset 2725 in MondoRescue for branches/2.2.9/mindi-busybox/util-linux/fdformat.c
- Timestamp:
- Feb 25, 2011, 9:26:54 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.9/mindi-busybox/util-linux/fdformat.c
r1765 r2725 1 1 /* vi: set sw=4 ts=4: */ 2 /* fdformat.c - Low-level formats a floppy disk - Werner Almesberger */ 3 4 /* 1999-02-22 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL> 5 * - added Native Language Support 6 * 1999-03-20 Arnaldo Carvalho de Melo <acme@conectiva.com.br> 7 * - more i18n/nls translatable strings marked 2 /* fdformat.c - Low-level formats a floppy disk - Werner Almesberger 3 * 5 July 2003 -- modified for Busybox by Erik Andersen 8 4 * 9 * 5 July 2003 -- modified for Busybox by Erik Andersen5 * Licensed under GPLv2, see file LICENSE in this source tree. 10 6 */ 11 7 … … 41 37 }; 42 38 #define FDFMTBEG _IO(2,0x47) 43 #define 39 #define FDFMTTRK _IOW(2,0x48, struct format_descr) 44 40 #define FDFMTEND _IO(2,0x49) 45 41 #define FDGETPRM _IOR(2, 0x04, struct floppy_struct) 46 42 #define FD_FILL_BYTE 0xF6 /* format fill byte. */ 47 43 48 int fdformat_main(int argc, char **argv);49 int fdformat_main(int argc ,char **argv)44 int fdformat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 45 int fdformat_main(int argc UNUSED_PARAM, char **argv) 50 46 { 51 47 int fd, n, cyl, read_bytes, verify; … … 55 51 struct format_descr descr; 56 52 57 if (argc < 2) { 58 bb_show_usage(); 59 } 53 opt_complementary = "=1"; /* must have 1 param */ 60 54 verify = !getopt32(argv, "n"); 61 55 argv += optind; … … 117 111 while (--read_bytes >= 0) { 118 112 if (data[read_bytes] != FD_FILL_BYTE) { 119 printf("bad data in cyl %d\nContinuing... ", cyl);113 printf("bad data in cyl %d\nContinuing... ", cyl); 120 114 } 121 115 }
Note:
See TracChangeset
for help on using the changeset viewer.