diff options
author | JinWang An <jinwang.an@samsung.com> | 2022-12-28 17:25:04 +0900 |
---|---|---|
committer | JinWang An <jinwang.an@samsung.com> | 2022-12-28 17:25:04 +0900 |
commit | a740e9d2034a23bca23095dc3508bc8b6e4e55cf (patch) | |
tree | 9e3bd82ee8aed380c2cfb68f01beb7914b83fe21 | |
parent | 8f039910c0f3e1d6ee8fd9f58e2c8fd53cf33c78 (diff) | |
download | mtools-a740e9d2034a23bca23095dc3508bc8b6e4e55cf.tar.gz mtools-a740e9d2034a23bca23095dc3508bc8b6e4e55cf.tar.bz2 mtools-a740e9d2034a23bca23095dc3508bc8b6e4e55cf.zip |
Imported Upstream version 4.0.37upstream/4.0.37
-rw-r--r-- | Makefile.in | 8 | ||||
-rw-r--r-- | NEWS | 7 | ||||
-rw-r--r-- | NEWS.rej | 16 | ||||
-rwxr-xr-x | config.guess | 13 | ||||
-rwxr-xr-x | config.sub | 20 | ||||
-rw-r--r-- | debian/changelog | 9 | ||||
-rw-r--r-- | debian/mtools.manpages | 1 | ||||
-rw-r--r-- | file.c.rej | 22 | ||||
-rw-r--r-- | floppyd.1 | 2 | ||||
-rw-r--r-- | floppyd_installtest.1 | 2 | ||||
-rw-r--r-- | floppyd_io.c | 2 | ||||
-rw-r--r-- | mattrib.1 | 2 | ||||
-rw-r--r-- | mbadblocks.1 | 2 | ||||
-rw-r--r-- | mcat.1 | 2 | ||||
-rw-r--r-- | mcd.1 | 2 | ||||
-rw-r--r-- | mcd.c | 33 | ||||
-rw-r--r-- | mclasserase.1 | 112 | ||||
-rw-r--r-- | mclasserase.c | 351 | ||||
-rw-r--r-- | mcopy.1 | 2 | ||||
-rw-r--r-- | mdel.1 | 2 | ||||
-rw-r--r-- | mdeltree.1 | 2 | ||||
-rw-r--r-- | mdir.1 | 2 | ||||
-rw-r--r-- | mdu.1 | 2 | ||||
-rw-r--r-- | mformat.1 | 2 | ||||
-rw-r--r-- | minfo.1 | 2 | ||||
-rw-r--r-- | mkmanifest.1 | 2 | ||||
-rwxr-xr-x | mkmanpages | 1 | ||||
-rw-r--r-- | mlabel.1 | 2 | ||||
-rw-r--r-- | mmd.1 | 2 | ||||
-rw-r--r-- | mmount.1 | 2 | ||||
-rw-r--r-- | mmove.1 | 2 | ||||
-rw-r--r-- | mpartition.1 | 2 | ||||
-rw-r--r-- | mrd.1 | 2 | ||||
-rw-r--r-- | mren.1 | 2 | ||||
-rw-r--r-- | mshortname.1 | 2 | ||||
-rw-r--r-- | mshowfat.1 | 2 | ||||
-rw-r--r-- | mtools.1 | 23 | ||||
-rw-r--r-- | mtools.5 | 4 | ||||
-rw-r--r-- | mtools.c | 1 | ||||
-rw-r--r-- | mtools.h | 1 | ||||
-rw-r--r-- | mtools.info | 229 | ||||
-rw-r--r-- | mtools.spec | 10 | ||||
-rw-r--r-- | mtools.texi | 53 | ||||
-rw-r--r-- | mtools.tmpl.1 | 23 | ||||
-rw-r--r-- | mtools.tmpl.5 | 4 | ||||
-rw-r--r-- | mtoolstest.1 | 2 | ||||
-rw-r--r-- | mtype.1 | 2 | ||||
-rw-r--r-- | mzip.1 | 2 | ||||
-rw-r--r-- | patchlevel.c | 6 | ||||
-rw-r--r-- | texinfo.tex | 28 | ||||
-rw-r--r-- | version.texi | 6 |
51 files changed, 254 insertions, 781 deletions
diff --git a/Makefile.in b/Makefile.in index d897f5f..741ec09 100644 --- a/Makefile.in +++ b/Makefile.in @@ -73,7 +73,7 @@ INSTALL_INFO = @INSTALL_INFO@ .SUFFIXES: .o .c MAN1 = floppyd.1 floppyd_installtest.1 mattrib.1 mbadblocks.1 mcat.1 \ -mcd.1 mclasserase.1 mcopy.1 mdel.1 mdeltree.1 mdir.1 mdu.1 mformat.1 \ +mcd.1 mcopy.1 mdel.1 mdeltree.1 mdir.1 mdu.1 mformat.1 \ minfo.1 mkmanifest.1 mlabel.1 mmd.1 mmount.1 mmove.1 mpartition.1 \ mrd.1 mren.1 mshortname.1 mshowfat.1 mtoolstest.1 mtools.1 mtype.1 \ mzip.1 @@ -89,7 +89,7 @@ OBJS_MTOOLS = buffer.o charsetConv.o codepages.o config.o copyfile.o \ device.o devices.o dirCache.o directory.o direntry.o dos2unix.o \ expand.o fat.o fat_free.o file.o file_name.o force_io.o hash.o init.o \ lba.o llong.o lockdev.o match.o mainloop.o mattrib.o mbadblocks.o \ -mcat.o mcd.o mclasserase.o mcopy.o mdel.o mdir.o mdoctorfat.o mdu.o \ +mcat.o mcd.o mcopy.o mdel.o mdir.o mdoctorfat.o mdu.o \ mformat.o minfo.o misc.o missFuncs.o mk_direntry.o mlabel.o mmd.o \ mmount.o mmove.o mpartition.o mshortname.o mshowfat.o mzip.o mtools.o \ offset.o old_dos.o open_image.o patchlevel.o partition.o plain_io.o \ @@ -111,7 +111,7 @@ SRCS = buffer.c codepages.c config.c copyfile.c device.c devices.c \ dirCache.c directory.c direntry.c dos2unix.c expand.c fat.c \ fat_free.c file.c file_name.c file_read.c force_io.c hash.c init.c \ lba.c lockdev.c match.c mainloop.c mattrib.c mbadblocks.c mcat.c \ -mcd.c mclasserase.c mcopy.c mdel.c mdir.c mdu.c mdoctorfat.c \ +mcd.c mcopy.c mdel.c mdir.c mdu.c mdoctorfat.c \ mformat.c minfo.c misc.c missFuncs.c mk_direntry.c mlabel.c mmd.c \ mmount.c mmove.c mpartition.c mshortname.c mshowfat.c mzip.c mtools.c \ offset.c old_dos.c open_image.c partition.c plain_io.c precmd.c \ @@ -124,7 +124,7 @@ SRCS-@USE_XDF@ += xdf_io.c SCRIPTS = mcheck mxtar uz tgz mcomp amuFormat.sh -LINKS=mattrib mcat mcd mclasserase mcopy mdel mdeltree mdir mdu \ +LINKS=mattrib mcat mcd mcopy mdel mdeltree mdir mdu \ mformat minfo mlabel mmd mmount mmove mpartition mrd mren mtype \ mtoolstest mshortname mshowfat mbadblocks mzip @@ -1,3 +1,10 @@ +v4_0_37 + - Removed mclasserase commands, which doesn't fit the coding + structure of the rest of mtools + - Add support to -i option to mcd + - Document -i in mtools.1 + - Fix a missing commad error in floppyd_io.c + v4_0_36 - Fix error status of recursive listing of empty root directory - If recursive listing, also show matched files at level one diff --git a/NEWS.rej b/NEWS.rej deleted file mode 100644 index 81ae14c..0000000 --- a/NEWS.rej +++ /dev/null @@ -1,16 +0,0 @@ ---- NEWS 2021-07-23 13:23:07.000000000 +0200 -+++ NEWS 2021-08-06 20:13:15.351297435 +0200 -@@ -1,8 +1,12 @@ -+v4_0_35 -+ - Fix cluster padding at end of file in batch mode, and add -+ comments about what happens here -+ - v4_0_34 - - Fix mcopy -s issue - - v4_0_33 -- - Fix support for partitions (broken in 4.0.34) -+ - Fix support for partitions (broken in 4.0.30) - - Portability fixes for Solaris 10 and 11 - - General simplification of configure script, and largefile handling - - Tested and fixed for platforms *without* largefile support diff --git a/config.guess b/config.guess index e81d3ae..b7806a8 100755 --- a/config.guess +++ b/config.guess @@ -1,14 +1,14 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-06-03' +timestamp='2022-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -437,7 +437,7 @@ case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in # This test works for both compilers. if test "$CC_FOR_BUILD" != no_compiler_found; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ + (CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 @@ -1522,6 +1522,9 @@ EOF i*86:rdos:*:*) GUESS=$UNAME_MACHINE-pc-rdos ;; + i*86:Fiwix:*:*) + GUESS=$UNAME_MACHINE-pc-fiwix + ;; *:AROS:*:*) GUESS=$UNAME_MACHINE-unknown-aros ;; @@ -1,14 +1,14 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2021 Free Software Foundation, Inc. +# Copyright 1992-2022 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2021-08-14' +timestamp='2022-01-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3 of the License, or +# the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -76,7 +76,7 @@ Report bugs and patches to <config-patches@gnu.org>." version="\ GNU config.sub ($timestamp) -Copyright 1992-2021 Free Software Foundation, Inc. +Copyright 1992-2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -1020,6 +1020,11 @@ case $cpu-$vendor in ;; # Here we normalize CPU types with a missing or matching vendor + armh-unknown | armh-alt) + cpu=armv7l + vendor=alt + basic_os=${basic_os:-linux-gnueabihf} + ;; dpx20-unknown | dpx20-bull) cpu=rs6000 vendor=bull @@ -1121,7 +1126,7 @@ case $cpu-$vendor in xscale-* | xscalee[bl]-*) cpu=`echo "$cpu" | sed 's/^xscale/arm/'` ;; - arm64-*) + arm64-* | aarch64le-*) cpu=aarch64 ;; @@ -1304,7 +1309,7 @@ esac if test x$basic_os != x then -# First recognize some ad-hoc caes, or perhaps split kernel-os, or else just +# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just # set os. case $basic_os in gnu/linux*) @@ -1748,7 +1753,8 @@ case $os in | skyos* | haiku* | rdos* | toppers* | drops* | es* \ | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ - | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr*) + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ + | fiwix* ) ;; # This one is extra strict with allowed versions sco3.2v2 | sco3.2v[4-9]* | sco5v6*) diff --git a/debian/changelog b/debian/changelog index 471dfc7..a8a1f6a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +mtools (4.0.37) stable; urgency=low + + * Removed mclasserase commands, which doesn't fit the coding + structure of the rest of mtools + * Add support to -i option to mcd + * Document -i in mtools.1 + * Fix a missing commad error in floppyd_io.c + + -- Alain Knaff <alain@knaff.lu> Sun, 26 Dec 2021 18:57:02 +0100 mtools (4.0.36) stable; urgency=low * Fix error status of recursive listing of empty root directory diff --git a/debian/mtools.manpages b/debian/mtools.manpages index be24a60..5d03275 100644 --- a/debian/mtools.manpages +++ b/debian/mtools.manpages @@ -3,7 +3,6 @@ mattrib.1 mbadblocks.1 mcat.1 mcd.1 -mclasserase.1 mcopy.1 mdel.1 mdeltree.1 diff --git a/file.c.rej b/file.c.rej deleted file mode 100644 index 29c30ab..0000000 --- a/file.c.rej +++ /dev/null @@ -1,22 +0,0 @@ ---- file.c 2021-07-23 12:11:15.000000000 +0200 -+++ file.c 2021-08-06 20:08:10.971108060 +0200 -@@ -444,13 +447,17 @@ - /* Error occured */ - return ret; - if((uint32_t)ret > requestedLen) -+ /* More data than requested may be written to lower -+ * levels if batch mode is active, in order to "pad" -+ * the last cluster of a file, so that we don't have -+ * to read that back from disk */ - bytesWritten = requestedLen; - else -- bytesWritten = requestedLen; -+ bytesWritten = (uint32_t)ret; - if (where + bytesWritten > This->FileSize ) - This->FileSize = where + bytesWritten; - recalcPreallocSize(This); -- return ret; -+ return (ssize_t)bytesWritten; - } - - @@ -1,5 +1,5 @@ '\" t -.TH floppyd 1 "21Nov21" mtools-4.0.36 +.TH floppyd 1 "08Jan22" mtools-4.0.37 .SH Name floppyd - floppy daemon for remote access to floppy drive '\" t diff --git a/floppyd_installtest.1 b/floppyd_installtest.1 index 7a7e91e..ec951d7 100644 --- a/floppyd_installtest.1 +++ b/floppyd_installtest.1 @@ -1,5 +1,5 @@ '\" t -.TH floppyd_installtest 1 "21Nov21" mtools-4.0.36 +.TH floppyd_installtest 1 "08Jan22" mtools-4.0.37 .SH Name floppyd_installtest - tests whether floppyd is installed and running '\" t diff --git a/floppyd_io.c b/floppyd_io.c index f7142b9..d884f94 100644 --- a/floppyd_io.c +++ b/floppyd_io.c @@ -40,7 +40,7 @@ static const char* AuthErrors[] = { "Auth failed: Packet oversized", "Auth failed: X-Cookie doesn't match", "Auth failed: Wrong transmission protocol version", - "Auth failed: Device locked" + "Auth failed: Device locked", "Auth failed: Bad packet", "Auth failed: I/O Error" }; @@ -1,5 +1,5 @@ '\" t -.TH mattrib 1 "21Nov21" mtools-4.0.36 +.TH mattrib 1 "08Jan22" mtools-4.0.37 .SH Name mattrib - change MSDOS file attribute flags '\" t diff --git a/mbadblocks.1 b/mbadblocks.1 index 73c673f..62ad593 100644 --- a/mbadblocks.1 +++ b/mbadblocks.1 @@ -1,5 +1,5 @@ '\" t -.TH mbadblocks 1 "21Nov21" mtools-4.0.36 +.TH mbadblocks 1 "08Jan22" mtools-4.0.37 .SH Name mbadblocks - tests a floppy disk, and marks the bad blocks in the FAT '\" t @@ -1,5 +1,5 @@ '\" t -.TH mcat 1 "21Nov21" mtools-4.0.36 +.TH mcat 1 "08Jan22" mtools-4.0.37 .SH Name mcat - dump raw disk image '\" t @@ -1,5 +1,5 @@ '\" t -.TH mcd 1 "21Nov21" mtools-4.0.36 +.TH mcd 1 "08Jan22" mtools-4.0.37 .SH Name mcd - change MSDOS directory '\" t @@ -39,19 +39,38 @@ static int mcd_callback(direntry_t *entry, MainParam_t *mp UNUSEDP) return GOT_ONE | STOP_NOW; } +static void usage(int ret) NORETURN; +static void usage(int ret) +{ + fprintf(stderr, "Mtools version %s, dated %s\n", + mversion, mdate); + fprintf(stderr, "Usage: %s: [-V] [-i image] msdosdirectory\n", + progname); + exit(ret); +} + void mcd(int argc, char **argv, int type UNUSEDP) NORETURN; void mcd(int argc, char **argv, int type UNUSEDP) { struct MainParam_t mp; - - if (argc > 2) { - fprintf(stderr, "Mtools version %s, dated %s\n", - mversion, mdate); - fprintf(stderr, "Usage: %s: [-V] msdosdirectory\n", argv[0]); - exit(1); + int c; + + while ((c = getopt(argc, argv, "i:")) != EOF) { + switch(c) { + case 'i': + set_cmd_line_image(optarg); + break; + case 'h': + usage(0); + default: + usage(1); + } } + if (argc > optind + 1) + usage(1); + init_mp(&mp); mp.lookupflags = ACCEPT_DIR | NO_DOTS; mp.dirCallback = mcd_callback; @@ -59,5 +78,5 @@ void mcd(int argc, char **argv, int type UNUSEDP) printf("%s\n", mp.mcwd); exit(0); } else - exit(main_loop(&mp, argv + 1, 1)); + exit(main_loop(&mp, argv + optind, 1)); } diff --git a/mclasserase.1 b/mclasserase.1 deleted file mode 100644 index 6785c69..0000000 --- a/mclasserase.1 +++ /dev/null @@ -1,112 +0,0 @@ -'\" t -.TH mclasserase 1 "21Nov21" mtools-4.0.36 -.SH Name -mclasserase - erase memory cards -'\" t -.de TQ -.br -.ns -.TP \\$1 -.. - -.tr \(is' -.tr \(if` -.tr \(pd" - -.SH Note\ of\ warning -This manpage has been automatically generated from mtools's texinfo -documentation, and may not be entirely accurate or complete. See the -end of this man page for details. -.PP -.SH Description -.PP -The \fR\&\f(CWmclasserase\fR command is used to wipe memory cards by -overwriting it three times: first with \fR\&\f(CW0xff\fR, then with -\&\fR\&\f(CW0x00\fR, then with \fR\&\f(CW0xff\fR again. The command uses the following -syntax: -.PP - -.nf -.ft 3 -.in +0.3i -\&\fR\&\f(CWmclasserase [\fR\&\f(CW-d] \fImsdosdrive\fR\&\f(CW -.fi -.in -0.3i -.ft R -.PP - -\&\fR -.PP -MS-DOS drive is optional, if none is specified, use \fR\&\f(CWA:\fR. If more than -one drive are specified, all but the last are ignored. -.PP -\&\fR\&\f(CWMclasserase\fR accepts the following command line options: -.TP -\&\fR\&\f(CWd\fR\ -Stop after each erase cycle, for testing purposes -.TP -\&\fR\&\f(CWp\fR\ -Not yet implemented -.PP -\&\fR\&\f(CWMclasserase\fR returns 0 on success or -1 on failure. -.PP -.SH See\ Also -Mtools' texinfo doc -.SH Viewing\ the\ texi\ doc -This manpage has been automatically generated from mtools's texinfo -documentation. However, this process is only approximative, and some -items, such as crossreferences, footnotes and indices are lost in this -translation process. Indeed, these items have no appropriate -representation in the manpage format. Moreover, not all information has -been translated into the manpage version. Thus I strongly advise you to -use the original texinfo doc. See the end of this manpage for -instructions how to view the texinfo doc. -.TP -* \ \ -To generate a printable copy from the texinfo doc, run the following -commands: - -.nf -.ft 3 -.in +0.3i - ./configure; make dvi; dvips mtools.dvi -.fi -.in -0.3i -.ft R -.PP - -\&\fR -.TP -* \ \ -To generate a html copy, run: - -.nf -.ft 3 -.in +0.3i - ./configure; make html -.fi -.in -0.3i -.ft R -.PP - -\&\fRA premade html can be found at -\&\fR\&\f(CW\(ifhttp://www.gnu.org/software/mtools/manual/mtools.html\(is\fR -.TP -* \ \ -To generate an info copy (browsable using emacs' info mode), run: - -.nf -.ft 3 -.in +0.3i - ./configure; make info -.fi -.in -0.3i -.ft R -.PP - -\&\fR -.PP -The texinfo doc looks most pretty when printed or as html. Indeed, in -the info version certain examples are difficult to read due to the -quoting conventions used in info. -.PP diff --git a/mclasserase.c b/mclasserase.c deleted file mode 100644 index 8a1c841..0000000 --- a/mclasserase.c +++ /dev/null @@ -1,351 +0,0 @@ -/* Copyright 2003 Stefan Feuz, Lukas Meyer, Thomas Locher - * Copyright 2004,2006,2007,2009 Alain Knaff. - * This file is part of mtools. - * - * Mtools is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Mtools is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Mtools. If not, see <http://www.gnu.org/licenses/>. - * - * Filename: - * mclasserase.c - * - * Original Creation Date: - * 05.III.2003 - * - * Copyright: - * GPL - * - * Programmer: - * Stefan Feuz, Lukas Meyer, Thomas Locher - */ - -#include "sysincludes.h" -#include "msdos.h" -#include "mtools.h" -#include "vfat.h" -#include "mainloop.h" - -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif - -#include "file.h" - -#include <unistd.h> -#include <stdio.h> - -/* - * Prints the Usage Message to STDOUT<br> - * - * @author stefan feuz<br> - * stefan.feuz@ruag.com - * - * @param n.a. - * - * @returns n.a. - * - */ -static void usage(int ret) NORETURN; -static void usage(int ret) -{ - fprintf(stderr, "Mtools version %s, dated %s\n", mversion, mdate); - fprintf(stderr, "Usage: %s [-d] drive:\n", progname); - exit(ret); -} - -/* - * Delete all files on a Drive.<br> - * - * @author Lukas Meyer<br> - * lukas.meyer@ruag.com - * @version 0.4, 11.12.2003 - * - * @param drive the drive to erase - * @param debug 1: stop after each erase cycle, 0: normal mode - * - * @returns n.a. - * - */ -static void do_mclasserase(char drive,int debug) NORETURN; -static void do_mclasserase(char drive,int debug) -{ - struct device dev; /* Device information structure */ - union bootsector boot; - - int media; /* Just used to enter some in find_device */ - char name[EXPAND_BUF]; - Stream_t *Stream; - struct label_blk_t *labelBlock; - - FILE * fDevice; /* Stores device's file descriptor */ - - char cCardType[12]; - - char drivel[3]; /* Stores the drive letter */ - - - int i = 0; - - /* FILE *forf; */ - - char dummy[2]; /* dummy input for debugging purposes.. */ - int icount=0; - int iTotalErase = 0; - -/* How many times we'll overwrite the media: */ -#define CYCLES 3 - unsigned char odat[CYCLES]; /* Data for each overwrite procedure */ - - /* Creating values for overwrite */ - odat[0]=0xff; - odat[1]=0x00; - odat[2]=0xff; - - - if (debug == 1) - printf("cycles: %i, odats: %i,%i,%i\n",CYCLES,odat[0],odat[1],odat[2]); - - - - /* Reading parameters from card. Exit with -1 if failed. */ - if(! (Stream = find_device(drive, O_RDONLY, &dev, &boot, - name, &media, 0, NULL))) - exit(1); - - FREE(&Stream); - - /* Determine the FAT - type */ -#if 0 - if(WORD(fatlen)) { - labelBlock = &bbelBlock = &boot->ext.old.labelBlock; - } else { - labelBlock = &boot->ext.fat32.labelBlock; - } -#endif - - /* we use only FAT12/16 ...*/ - labelBlock = &boot.boot.ext.old.labelBlock; - - /* store card type */ - sprintf(cCardType, "%11.11s", labelBlock->label); - - if (debug == 1) - { - printf("Using Device: %s\n",name); - printf("Card-Type detected: %s\n",cCardType); - } - - /* Forming cat command to overwrite the medias content. */ - sprintf( drivel, "%c:", ch_tolower(drive) ); - -#if 0 - media_sectors = dev.tracks * dev.sectors; - sector_size = WORD(secsiz) * dev.heads; - - - printf(mcat); - printf("\n%d\n", media_sectors); - printf("%d\n", sector_size); -#endif - - /* - * Overwrite device - */ - for( i=0; i < CYCLES; i++){ - - if (debug==1) - { - printf("Erase Cycle %i, writing data: 0x%2.2x...\n",i+1,odat[i]); - } - - fDevice = fopen(name,"ab+"); - - if (fDevice == 0) - { - perror("Error opening device"); - exit(-1); - } - - - if (debug==1) - { - printf("Open successful...\n"); - printf("Flushing device after 32 kBytes of data...\n"); - printf("Erasing:"); - fflush( stdout ); - } - - /* iTotalErase = 0; */ - - /* - * overwrite the whole device - */ - while ((feof(fDevice)==0) && (ferror(fDevice)==0)) - { - - fputc(odat[i],fDevice); - - icount++; - if (icount > (32 * 1024)) - { - /* flush device every 32KB of data...*/ - fflush( fDevice ); - - iTotalErase += icount; - if (debug == 1) - { - printf("."); - fflush( stdout ); - } - icount=0; - } - } - - if (debug==1) - { - printf("\nPress <ENTER> to continue\n"); - printf("Press <x> and <ENTER> to abort\n"); - - if(scanf("%c",dummy) < 1) - printf("Input error\n"); - fflush( stdin ); - - if (strcmp(dummy,"x") == 0) - { - printf("exiting.\n"); - exit(0); - } - } - - fclose(fDevice); - - } - - - /* - * Format device using shell script - */ - if (debug == 0) - { - /* redirect STDERR and STDOUT to the black hole... */ - if (dup2(open("/dev/null", O_WRONLY), STDERR_FILENO) != STDERR_FILENO) - printf("Error with dup2() stdout\n"); - if (dup2(open("/dev/null", O_WRONLY), STDOUT_FILENO) != STDOUT_FILENO) - printf("Error with dup2() stdout\n"); - } - - if (debug == 1) - printf("Calling amuFormat.sh with args: %s,%s\n",cCardType,drivel); - - execlp("amuFormat.sh","",cCardType,drivel,NULL); - - /* we never come back...(we shouldn't come back ...) */ - exit(-1); - -} - - -/* - * Total Erase of Data on a Disk. After using mclasserase there won't - * be ANY bits of old files on the disk.<br> - * - * @author stefan feuz<br> - * thomas locher<br> - * stefan.feuz@ruag.com - * thomas.locher@ruag.com - * @version 0.3, 02.12.2003 - * - * @param argc generated automatically by operating systems - * @param **argv1 generated automatically by operating systems - * @param type generated automatically by operating systems - * - * @param -d stop after each erase cycle, for testing purposes - * - * @returns int 0 if all is well done<br> - * int -1 if there is something wrong - * - * @info mclasserase [-p tempFilePath] [-d] drive: - * - * - */ -void mclasserase(int argc, char **argv, int type UNUSEDP) NORETURN; -void mclasserase(int argc, char **argv, int type UNUSEDP) -{ - /* declaration of all variables */ - int c; - int debug=0; - /* char* tempFilePath=NULL; */ - char drive='a'; - - extern int optind; - - destroy_privs(); - - /* check and read command line arguments */ -#ifdef DEBUG - printf("mclasserase: argc = %i\n",argc); -#endif - /* check num of arguments */ - if(helpFlag(argc, argv)) - usage(0); - if ( (argc != 2) & (argc != 3) & (argc != 4)) - { /* wrong num of arguments */ - printf ("mclasserase: wrong num of args\n"); - usage(1); - } - else - { /* correct num of arguments */ - while ((c = getopt(argc, argv, "+p:dh")) != EOF) - { - switch (c) - { - - case 'd': - - printf("=============\n"); - printf("Debug Mode...\n"); - printf("=============\n"); - debug = 1; - break; - case 'p': - printf("option -p not implemented yet\n"); - break; - case 'h': - usage(0); - case '?': - usage(1); - default: - break; - } - } -#ifdef DEBUG - printf("mclasserase: optind = %i\n",optind); - /* look for the drive to erase */ - printf("mclasserase: searching drive\n"); -#endif - for(; optind < argc; optind++) - { - if(!argv[optind][0] || argv[optind][1] != ':') - { - usage(1); - } - drive = ch_toupper(argv[optind][0]); - } - } -#ifdef DEBUG - printf("mclasserase: found drive %c\n", drive); -#endif - /* remove all data on drive, you never come back if drive does - * not exist */ - - do_mclasserase(drive,debug); -} @@ -1,5 +1,5 @@ '\" t -.TH mcopy 1 "21Nov21" mtools-4.0.36 +.TH mcopy 1 "08Jan22" mtools-4.0.37 .SH Name mcopy - copy MSDOS files to/from Unix '\" t @@ -1,5 +1,5 @@ '\" t -.TH mdel 1 "21Nov21" mtools-4.0.36 +.TH mdel 1 "08Jan22" mtools-4.0.37 .SH Name mdel - delete an MSDOS file '\" t @@ -1,5 +1,5 @@ '\" t -.TH mdeltree 1 "21Nov21" mtools-4.0.36 +.TH mdeltree 1 "08Jan22" mtools-4.0.37 .SH Name mdeltree - recursively delete an MSDOS directory and its contents '\" t @@ -1,5 +1,5 @@ '\" t -.TH mdir 1 "21Nov21" mtools-4.0.36 +.TH mdir 1 "08Jan22" mtools-4.0.37 .SH Name mdir - display an MSDOS directory '\" t @@ -1,5 +1,5 @@ '\" t -.TH mdu 1 "21Nov21" mtools-4.0.36 +.TH mdu 1 "08Jan22" mtools-4.0.37 .SH Name mdu - display the amount of space occupied by an MSDOS directory '\" t @@ -1,5 +1,5 @@ '\" t -.TH mformat 1 "21Nov21" mtools-4.0.36 +.TH mformat 1 "08Jan22" mtools-4.0.37 .SH Name mformat - add an MSDOS filesystem to a low-level formatted floppy disk '\" t @@ -1,5 +1,5 @@ '\" t -.TH minfo 1 "21Nov21" mtools-4.0.36 +.TH minfo 1 "08Jan22" mtools-4.0.37 .SH Name minfo - print the parameters of a MSDOS filesystem '\" t diff --git a/mkmanifest.1 b/mkmanifest.1 index 496b496..5fa70c6 100644 --- a/mkmanifest.1 +++ b/mkmanifest.1 @@ -1,5 +1,5 @@ '\" t -.TH mkmanifest 1 "21Nov21" mtools-4.0.36 +.TH mkmanifest 1 "08Jan22" mtools-4.0.37 .SH Name mkmanifest - makes list of file names and their DOS 8+3 equivalent '\" t @@ -95,7 +95,6 @@ echo floppyd_installtest echo mattrib echo mbadblocks echo mcd -echo mclasserase echo mcopy echo mdel echo mdeltree @@ -1,5 +1,5 @@ '\" t -.TH mlabel 1 "21Nov21" mtools-4.0.36 +.TH mlabel 1 "08Jan22" mtools-4.0.37 .SH Name mlabel - make an MSDOS volume label '\" t @@ -1,5 +1,5 @@ '\" t -.TH mmd 1 "21Nov21" mtools-4.0.36 +.TH mmd 1 "08Jan22" mtools-4.0.37 .SH Name mmd - make an MSDOS subdirectory '\" t @@ -1,5 +1,5 @@ '\" t -.TH mmount 1 "21Nov21" mtools-4.0.36 +.TH mmount 1 "08Jan22" mtools-4.0.37 .SH Name mmount - mount an MSDOS disk '\" t @@ -1,5 +1,5 @@ '\" t -.TH mmove 1 "21Nov21" mtools-4.0.36 +.TH mmove 1 "08Jan22" mtools-4.0.37 .SH Name mmove - move or rename an MSDOS file or subdirectory '\" t diff --git a/mpartition.1 b/mpartition.1 index 2023ecf..a87ee77 100644 --- a/mpartition.1 +++ b/mpartition.1 @@ -1,5 +1,5 @@ '\" t -.TH mpartition 1 "21Nov21" mtools-4.0.36 +.TH mpartition 1 "08Jan22" mtools-4.0.37 .SH Name mpartition - partition an MSDOS hard disk '\" t @@ -1,5 +1,5 @@ '\" t -.TH mrd 1 "21Nov21" mtools-4.0.36 +.TH mrd 1 "08Jan22" mtools-4.0.37 .SH Name mrd - remove an MSDOS subdirectory '\" t @@ -1,5 +1,5 @@ '\" t -.TH mren 1 "21Nov21" mtools-4.0.36 +.TH mren 1 "08Jan22" mtools-4.0.37 .SH Name mren - rename an existing MSDOS file '\" t diff --git a/mshortname.1 b/mshortname.1 index d0dd03b..98d0f74 100644 --- a/mshortname.1 +++ b/mshortname.1 @@ -1,5 +1,5 @@ '\" t -.TH mshortname 1 "21Nov21" mtools-4.0.36 +.TH mshortname 1 "08Jan22" mtools-4.0.37 .SH Name mshortname - shows short name of a file '\" t @@ -1,5 +1,5 @@ '\" t -.TH mshowfat 1 "21Nov21" mtools-4.0.36 +.TH mshowfat 1 "08Jan22" mtools-4.0.37 .SH Name mshowfat - shows FAT clusters allocated to file '\" t @@ -1,5 +1,5 @@ '\" t -.TH mtools 1 "20Nov21" mtools-4.0.35 +.TH mtools 1 "26Dec21" mtools-4.0.37 .SH Name mtools - utilities to access DOS disks in Unix. '\" t @@ -36,7 +36,7 @@ Mtools can be found at the following places (and their mirrors): .nf .ft 3 .in +0.3i -http://ftp.gnu.org/gnu/mtools/mtools-4.0.35.tar.gz +http://ftp.gnu.org/gnu/mtools/mtools-4.0.37.tar.gz .fi .in -0.3i .ft R @@ -82,13 +82,17 @@ All options use the \fR\&\f(CW-\fR (minus) as their first character, not Most mtools commands allow multiple filename parameters, which doesn't follow MS-DOS conventions, but which is more user-friendly. .PP -Most mtools commands allow options that instruct them how to handle file -name clashes. See section name clashes, for more details on these. All -commands accept the \fR\&\f(CW-V\fR flags which prints the version, and most -accept the \fR\&\f(CW-v\fR flag, which switches on verbose mode. In verbose -mode, these commands print out the name of the MS-DOS files upon which -they act, unless stated otherwise. See section Commands, for a description of -the options which are specific to each command. +Most mtools commands allow options that instruct them how to handle +file name clashes. See section name clashes, for more details on these. +.PP +All commands accept the \fR\&\f(CW-i\fR flag which allows to specify an +image file (See section drive letters). +.PP +All commands accept the \fR\&\f(CW-V\fR flag which prints the version, and +most accept the \fR\&\f(CW-v\fR flag, which switches on verbose mode. In +verbose mode, these commands print out the name of the MS-DOS files +upon which they act, unless stated otherwise. See section Commands, for a +description of the options which are specific to each command. .PP .SS Drive\ letters .PP @@ -479,7 +483,6 @@ floppyd_installtest mattrib mbadblocks mcd -mclasserase mcopy mdel mdeltree @@ -1,5 +1,5 @@ '\" t -.TH mtools 5 "20Nov21" MTOOLS MTOOLS +.TH mtools 5 "26Dec21" MTOOLS MTOOLS .SH Name mtools.conf - mtools configuration files '\" t @@ -13,7 +13,7 @@ mtools.conf - mtools configuration files .tr \(if` .tr \(pd" -.ds St Mtools\ 4.0.35 +.ds St Mtools\ 4.0.37 .PP .SH Description .PP @@ -32,7 +32,6 @@ static const struct dispatch { {"mbadblocks",mbadblocks, 0}, {"mcat",mcat, 0}, {"mcd",mcd, 0}, - {"mclasserase",mclasserase, 0}, {"mcopy",mcopy, 0}, {"mdel",mdel, 0}, {"mdeltree",mdel, 2}, @@ -208,7 +208,6 @@ void mattrib(int argc, char **argv, int type); void mbadblocks(int argc, char **argv, int type); void mcat(int argc, char **argv, int type); void mcd(int argc, char **argv, int type); -void mclasserase(int argc, char **argv, int type); void mcopy(int argc, char **argv, int type); void mdel(int argc, char **argv, int type); void mdir(int argc, char **argv, int type); diff --git a/mtools.info b/mtools.info index cd125aa..44ecf44 100644 --- a/mtools.info +++ b/mtools.info @@ -1,6 +1,6 @@ This is mtools.info, produced by makeinfo version 6.7 from mtools.texi. -This manual is for Mtools (version 4.0.36, November 2021), which is a +This manual is for Mtools (version 4.0.37, January 2022), which is a collection of tools to allow Unix systems to manipulate MS-DOS files. Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright @@ -53,7 +53,7 @@ preliminary mounting or initialization (assuming the default '/etc/mtools.conf' works on your machine). With mtools, one can change floppies too without unmounting and mounting. - This manual is for Mtools (version 4.0.36, November 2021), which is a + This manual is for Mtools (version 4.0.37, January 2022), which is a collection of tools to allow Unix systems to manipulate MS-DOS files. Copyright (C) 2007, 2009 Free Software Foundation, Inc. Copyright @@ -87,7 +87,7 @@ File: mtools.info, Node: Location, Next: Common features, Prev: Top, Up: Top ********************* Mtools can be found at the following places (and their mirrors): - http://ftp.gnu.org/gnu/mtools/mtools-4.0.36.tar.gz + http://ftp.gnu.org/gnu/mtools/mtools-4.0.37.tar.gz These patches are named 'mtools-'VERSION'-'DDMM'.taz', where version stands for the base version, DD for the day and MM for the month. Due @@ -149,7 +149,11 @@ doesn't follow MS-DOS conventions, but which is more user-friendly. Most mtools commands allow options that instruct them how to handle file name clashes. *Note name clashes::, for more details on these. -All commands accept the '-V' flags which prints the version, and most + + All commands accept the '-i' flag which allows to specify an image +file (*Note drive letters::). + + All commands accept the '-V' flag which prints the version, and most accept the '-v' flag, which switches on verbose mode. In verbose mode, these commands print out the name of the MS-DOS files upon which they act, unless stated otherwise. *Note Commands::, for a description of @@ -1073,7 +1077,6 @@ description of those. * mbadblocks:: tests a floppy disk, and marks the bad blocks in the FAT * mcat:: same as cat. Only useful with floppyd. * mcd:: change MS-DOS directory -* mclasserase:: erase memory card * mcopy:: copy MS-DOS files to/from Unix * mdel:: delete an MS-DOS file * mdeltree:: recursively delete an MS-DOS directory @@ -1340,7 +1343,7 @@ the low-level nature of this command, it will happily destroy any data written before on the disk without warning! -File: mtools.info, Node: mcd, Next: mclasserase, Prev: mcat, Up: Commands +File: mtools.info, Node: mcd, Next: mcopy, Prev: mcat, Up: Commands 4.6 Mcd ======= @@ -1365,33 +1368,9 @@ the file is more than 6 hours old. another device. It may be wise to remove old '.mcwd' files at logout. -File: mtools.info, Node: mclasserase, Next: mcopy, Prev: mcd, Up: Commands - -4.7 Mclasserase -=============== - -The 'mclasserase' command is used to wipe memory cards by overwriting it -three times: first with '0xff', then with '0x00', then with '0xff' -again. The command uses the following syntax: - - mclasserase [-d] MSDOSDRIVE - - MS-DOS drive is optional, if none is specified, use 'A:'. If more -than one drive are specified, all but the last are ignored. - - 'Mclasserase' accepts the following command line options: - -'d' - Stop after each erase cycle, for testing purposes -'p' - Not yet implemented - - 'Mclasserase' returns 0 on success or -1 on failure. - - -File: mtools.info, Node: mcopy, Next: mdel, Prev: mclasserase, Up: Commands +File: mtools.info, Node: mcopy, Next: mdel, Prev: mcd, Up: Commands -4.8 Mcopy +4.7 Mcopy ========= The 'mcopy' command is used to copy MS-DOS files to and from Unix. It @@ -1455,7 +1434,7 @@ depending on its position on the command line. 'v' Verbose. Displays the name of each file as it is copied. -4.8.1 Bugs +4.7.1 Bugs ---------- Unlike MS-DOS, the '+' operator (append) from MS-DOS is not supported. @@ -1466,7 +1445,7 @@ However, you may use 'mtype' to produce the same effect: File: mtools.info, Node: mdel, Next: mdeltree, Prev: mcopy, Up: Commands -4.9 Mdel +4.8 Mdel ======== The 'mdel' command is used to delete an MS-DOS file. Its syntax is: @@ -1480,8 +1459,8 @@ The 'mdel' command is used to delete an MS-DOS file. Its syntax is: File: mtools.info, Node: mdeltree, Next: mdir, Prev: mdel, Up: Commands -4.10 Mdeltree -============= +4.9 Mdeltree +============ The 'mdeltree' command is used to delete an MS-DOS file. Its syntax is: @@ -1494,7 +1473,7 @@ directory to be removed does not exist. File: mtools.info, Node: mdir, Next: mdu, Prev: mdeltree, Up: Commands -4.11 Mdir +4.10 Mdir ========= The 'mdir' command is used to display an MS-DOS directory. Its syntax @@ -1531,7 +1510,7 @@ for some MS-DOS files. File: mtools.info, Node: mdu, Next: mformat, Prev: mdir, Up: Commands -4.12 Mdu +4.11 Mdu ======== 'Mdu' is used to list the space occupied by a directory, its @@ -1550,7 +1529,7 @@ the cluster size. File: mtools.info, Node: mformat, Next: mkmanifest, Prev: mdu, Up: Commands -4.13 Mformat +4.12 Mformat ============ The 'mformat' command is used to add an MS-DOS file system to a @@ -1742,7 +1721,7 @@ the default. It doesn't record bad block information to the Fat, use 'mbadblocks' for that. -4.13.1 Number of sectors per cluster +4.12.1 Number of sectors per cluster ------------------------------------ If the user indicates no cluster size, mformat figures out a default @@ -1777,7 +1756,7 @@ sectors. File: mtools.info, Node: mkmanifest, Next: minfo, Prev: mformat, Up: Commands -4.14 Mkmanifest +4.13 Mkmanifest =============== The 'mkmanifest' command is used to create a shell script (packing list) @@ -1795,7 +1774,7 @@ arc,' and 'mtools' to change perfectly good Unix filenames to fit the MS-DOS restrictions. This command is only useful if the target system which will read the diskette cannot handle VFAT long names. -4.14.1 Example +4.13.1 Example -------------- You want to copy the following Unix files to a MS-DOS diskette (using @@ -1834,7 +1813,7 @@ system, and I now want the files back to their original names. If the file "manifest" (the output captured above) was sent along with those files, it could be used to convert the filenames. -4.14.2 Bugs +4.13.2 Bugs ----------- The short names generated by 'mkmanifest' follow the old convention @@ -1843,7 +1822,7 @@ The short names generated by 'mkmanifest' follow the old convention File: mtools.info, Node: minfo, Next: mlabel, Prev: mkmanifest, Up: Commands -4.15 Minfo +4.14 Minfo ========== The 'minfo' command prints the parameters of a MS-DOS file system, such @@ -1861,7 +1840,7 @@ with MS-DOS 1.0 file systems File: mtools.info, Node: mlabel, Next: mmd, Prev: minfo, Up: Commands -4.16 Mlabel +4.15 Mlabel =========== The 'mlabel' command adds a volume label to a disk. Its syntax is: @@ -1894,7 +1873,7 @@ success or 1 on failure. File: mtools.info, Node: mmd, Next: mmount, Prev: mlabel, Up: Commands -4.17 Mmd +4.16 Mmd ======== The 'mmd' command is used to make an MS-DOS subdirectory. Its syntax @@ -1908,7 +1887,7 @@ occurs if the directory already exists. File: mtools.info, Node: mmount, Next: mmove, Prev: mmd, Up: Commands -4.18 Mmount +4.17 Mmount =========== The 'mmount' command is used to mount an MS-DOS disk. It is only @@ -1925,7 +1904,7 @@ the disk is write protected, it is automatically mounted read only. File: mtools.info, Node: mmove, Next: mpartition, Prev: mmount, Up: Commands -4.19 Mmove +4.18 Mmove ========== The 'mmove' command is used to move or rename an existing MS-DOS file or @@ -1943,7 +1922,7 @@ parameters, drive a: is assumed by default. File: mtools.info, Node: mpartition, Next: mrd, Prev: mmove, Up: Commands -4.20 Mpartition +4.19 Mpartition =============== The 'mpartition' command is used to create MS-DOS file systems as @@ -2028,7 +2007,7 @@ partition table: 'B BOOTSECTOR' Reads the template master boot record from file BOOTSECTOR. -4.20.1 Choice of partition type +4.19.1 Choice of partition type ------------------------------- Mpartition proceeds as follows to pick a type for the partition: @@ -2071,7 +2050,7 @@ with two notable differences: File: mtools.info, Node: mrd, Next: mren, Prev: mpartition, Up: Commands -4.21 Mrd +4.20 Mrd ======== The 'mrd' command is used to remove an MS-DOS subdirectory. Its syntax @@ -2085,7 +2064,7 @@ occurs if the directory does not exist or is not empty. File: mtools.info, Node: mren, Next: mshortname, Prev: mrd, Up: Commands -4.22 Mren +4.21 Mren ========= The 'mren' command is used to rename or move an existing MS-DOS file or @@ -2107,7 +2086,7 @@ version of 'REN', 'mren' can be used to rename directories. File: mtools.info, Node: mshortname, Next: mshowfat, Prev: mren, Up: Commands -4.23 Mshortname +4.22 Mshortname =============== The 'mshortname' command is used to display the short name of a file. @@ -2121,7 +2100,7 @@ without any character set conversion. File: mtools.info, Node: mshowfat, Next: mtoolstest, Prev: mshortname, Up: Commands -4.24 Mshowfat +4.23 Mshowfat ============= The 'mshowfat' command is used to display the FAT entries for a file. @@ -2136,7 +2115,7 @@ containing that offset is printed. File: mtools.info, Node: mtoolstest, Next: mtype, Prev: mshowfat, Up: Commands -4.25 Mtoolstest +4.24 Mtoolstest =============== The 'mtoolstest' command is used to tests the mtools configuration @@ -2150,7 +2129,7 @@ files into new style configuration files. File: mtools.info, Node: mtype, Next: mzip, Prev: mtoolstest, Up: Commands -4.26 Mtype +4.25 Mtype ========== The 'mtype' command is used to display contents of an MS-DOS file. Its @@ -2181,7 +2160,7 @@ arguments. File: mtools.info, Node: mzip, Prev: mtype, Up: Commands -4.27 Mzip +4.26 Mzip ========= The 'mzip' command is used to issue ZIP disk specific commands on Linux, @@ -2226,7 +2205,7 @@ in a Mac. On a PC, the Mac file system appears as a hidden file named 'partishn.mac'. You may erase it to reclaim the 50 Megs of space taken up by the Mac file system. -4.27.1 Bugs +4.26.1 Bugs ----------- This command is a big kludge. A proper implementation would take a @@ -2595,14 +2574,12 @@ Concept index * mcat: mcat. (line 9) * mcd: mcd. (line 6) * mcd (introduction): directory. (line 6) -* mclasserase: mclasserase. (line 6) * mcopy: mcopy. (line 6) * Mcwd file: mcd. (line 6) * mdel: mdel. (line 6) * mdeltree: mdeltree. (line 6) * mdir: mdir. (line 6) * mdu: mdu. (line 6) -* Memory Card: mclasserase. (line 6) * mformat: mformat. (line 6) * mformat (geometry used for): geometry description. (line 6) * mformat parameters: minfo. (line 6) @@ -2643,7 +2620,6 @@ Concept index * partitions (creating): mpartition. (line 6) * password protected Zip disks: mzip. (line 6) * patches: Location. (line 6) -* Physically erase: mclasserase. (line 6) * plain floppy: device xxx busy: miscellaneous flags. (line 11) * Porting: Porting mtools. (line 6) * Primary file name (long names): long names. (line 6) @@ -2723,72 +2699,71 @@ Concept index Tag Table: -Node: Top872 -Node: Location3129 -Node: Common features4067 -Node: arguments4831 -Node: drive letters6492 -Node: directory7846 -Node: long names8292 -Node: name clashes10838 -Node: case sensitivity13122 -Node: high capacity formats14359 -Node: more sectors15404 -Node: bigger sectors16459 -Node: 2m17188 -Node: XDF18374 -Node: exit codes19717 -Node: bugs20355 -Node: Configuration20888 -Node: configuration file location22177 -Node: general syntax22630 -Node: default values23461 -Node: global variables23989 -Node: per drive variables26182 -Node: general information27017 -Node: location information27459 -Node: geometry description28988 -Node: open flags32849 -Node: miscellaneous variables33449 -Node: miscellaneous flags37039 -Node: multiple descriptions40669 -Node: parsing order42343 -Node: old style configuration43374 -Node: Commands44073 -Node: floppyd45995 -Node: floppyd_installtest50788 -Node: mattrib51419 -Node: mbadblocks53214 -Node: mcat54508 -Node: mcd55322 -Node: mclasserase56183 -Node: mcopy56859 -Node: mdel59877 -Node: mdeltree60216 -Node: mdir60635 -Node: mdu61911 -Node: mformat62417 -Node: mkmanifest70928 -Node: minfo72902 -Node: mlabel73472 -Node: mmd74625 -Node: mmount74974 -Node: mmove75577 -Node: mpartition76382 -Node: mrd81908 -Node: mren82266 -Node: mshortname83015 -Node: mshowfat83345 -Node: mtoolstest83754 -Node: mtype84326 -Node: mzip85177 -Ref: mzip-Footnote-187202 -Ref: mzip-Footnote-287283 -Node: Compiling mtools87570 -Node: Porting mtools88669 -Node: Command Index94577 -Node: Variable Index94705 -Node: Concept Index96528 +Node: Top871 +Node: Location3127 +Node: Common features4065 +Node: arguments4829 +Node: drive letters6594 +Node: directory7948 +Node: long names8394 +Node: name clashes10940 +Node: case sensitivity13224 +Node: high capacity formats14461 +Node: more sectors15506 +Node: bigger sectors16561 +Node: 2m17290 +Node: XDF18476 +Node: exit codes19819 +Node: bugs20457 +Node: Configuration20990 +Node: configuration file location22279 +Node: general syntax22732 +Node: default values23563 +Node: global variables24091 +Node: per drive variables26284 +Node: general information27119 +Node: location information27561 +Node: geometry description29090 +Node: open flags32951 +Node: miscellaneous variables33551 +Node: miscellaneous flags37141 +Node: multiple descriptions40771 +Node: parsing order42445 +Node: old style configuration43476 +Node: Commands44175 +Node: floppyd46057 +Node: floppyd_installtest50850 +Node: mattrib51481 +Node: mbadblocks53276 +Node: mcat54570 +Node: mcd55384 +Node: mcopy56239 +Node: mdel59249 +Node: mdeltree59588 +Node: mdir60005 +Node: mdu61281 +Node: mformat61787 +Node: mkmanifest70298 +Node: minfo72272 +Node: mlabel72842 +Node: mmd73995 +Node: mmount74344 +Node: mmove74947 +Node: mpartition75752 +Node: mrd81278 +Node: mren81636 +Node: mshortname82385 +Node: mshowfat82715 +Node: mtoolstest83124 +Node: mtype83696 +Node: mzip84547 +Ref: mzip-Footnote-186572 +Ref: mzip-Footnote-286653 +Node: Compiling mtools86940 +Node: Porting mtools88039 +Node: Command Index93947 +Node: Variable Index94075 +Node: Concept Index95898 End Tag Table diff --git a/mtools.spec b/mtools.spec index 9b1a2f6..ac0248f 100644 --- a/mtools.spec +++ b/mtools.spec @@ -1,7 +1,7 @@ %define _binary_payload w9.gzdio Name: mtools Summary: mtools, read/write/list/format DOS disks under Unix -Version: 4.0.36 +Version: 4.0.37 Release: 1 License: GPLv3+ Group: Utilities/System @@ -49,7 +49,6 @@ rm %{buildroot}%{_infodir}/dir %{_mandir}/man1/mbadblocks.1* %{_mandir}/man1/mcat.1* %{_mandir}/man1/mcd.1* -%{_mandir}/man1/mclasserase.1* %{_mandir}/man1/mcopy.1* %{_mandir}/man1/mdel.1* %{_mandir}/man1/mdeltree.1* @@ -77,7 +76,6 @@ rm %{buildroot}%{_infodir}/dir %{_bindir}/mbadblocks %{_bindir}/mcat %{_bindir}/mcd -%{_bindir}/mclasserase %{_bindir}/mcopy %{_bindir}/mdel %{_bindir}/mdeltree @@ -135,6 +133,12 @@ if [ -f %{_bindir}/install-info ] ; then fi %changelog +* Sun Dec 26 2021 Alain Knaff <alain@knaff.lu> +- Removed mclasserase commands, which doesn't fit the coding + structure of the rest of mtools +- Add support to -i option to mcd +- Document -i in mtools.1 +- Fix a missing commad error in floppyd_io.c * Sun Nov 21 2021 Alain Knaff <alain@knaff.lu> - Fix error status of recursive listing of empty root directory - If recursive listing, also show matched files at level one diff --git a/mtools.texi b/mtools.texi index d29a2d7..7b3dca5 100644 --- a/mtools.texi +++ b/mtools.texi @@ -165,14 +165,17 @@ All options use the @code{-} (minus) as their first character, not Most mtools commands allow multiple filename parameters, which doesn't follow MS-DOS conventions, but which is more user-friendly. -Most mtools commands allow options that instruct them how to handle file -name clashes. @xref{name clashes}, for more details on these. All -commands accept the @code{-V} flags which prints the version, and most -accept the @code{-v} flag, which switches on verbose mode. In verbose -mode, these commands print out the name of the MS-DOS files upon which -they act, unless stated otherwise. @xref{Commands}, for a description of -the options which are specific to each command. +Most mtools commands allow options that instruct them how to handle +file name clashes. @xref{name clashes}, for more details on these. +All commands accept the @code{-i} flag which allows to specify an +image file (@xref{drive letters}). + +All commands accept the @code{-V} flag which prints the version, and +most accept the @code{-v} flag, which switches on verbose mode. In +verbose mode, these commands print out the name of the MS-DOS files +upon which they act, unless stated otherwise. @xref{Commands}, for a +description of the options which are specific to each command. @node drive letters, directory, arguments, Common features @section Drive letters @@ -1217,7 +1220,6 @@ description of those. * mbadblocks:: tests a floppy disk, and marks the bad blocks in the FAT * mcat:: same as cat. Only useful with floppyd. * mcd:: change MS-DOS directory -* mclasserase:: erase memory card * mcopy:: copy MS-DOS files to/from Unix * mdel:: delete an MS-DOS file * mdeltree:: recursively delete an MS-DOS directory @@ -1509,7 +1511,7 @@ stdin and writes it to the given device. command, it will happily destroy any data written before on the disk without warning! -@node mcd, mclasserase, mcat, Commands +@node mcd, mcopy, mcat, Commands @section Mcd @pindex mcd @cindex Directory (changing) @@ -1539,38 +1541,7 @@ if the file is more than 6 hours old. Unlike MS-DOS versions of @code{CD}, @code{mcd} can be used to change to another device. It may be wise to remove old @file{.mcwd} files at logout. -@node mclasserase, mcopy, mcd, Commands -@section Mclasserase -@pindex mclasserase -@cindex Memory Card -@cindex Physically erase - -The @code{mclasserase} command is used to wipe memory cards by -overwriting it three times: first with @code{0xff}, then with -@code{0x00}, then with @code{0xff} again. The command uses the following -syntax: - -@example -@code{mclasserase} [@code{-d}] @var{msdosdrive} -@end example - -MS-DOS drive is optional, if none is specified, use @code{A:}. If more than -one drive are specified, all but the last are ignored. - -@code{Mclasserase} accepts the following command line options: - -@table @code -@item d -Stop after each erase cycle, for testing purposes -@item p -Not yet implemented -@end table - - -@code{Mclasserase} returns 0 on success or -1 on failure. - - -@node mcopy, mdel, mclasserase, Commands +@node mcopy, mdel, mcd, Commands @section Mcopy @pindex mcopy @cindex Reading MS-DOS files diff --git a/mtools.tmpl.1 b/mtools.tmpl.1 index cae1d40..2e80714 100644 --- a/mtools.tmpl.1 +++ b/mtools.tmpl.1 @@ -1,5 +1,5 @@ '\" t -.TH mtools 1 "21Nov21" mtools-4.0.36 +.TH mtools 1 "08Jan22" mtools-4.0.37 .SH Name mtools - utilities to access DOS disks in Unix. '\" t @@ -36,7 +36,7 @@ Mtools can be found at the following places (and their mirrors): .nf .ft 3 .in +0.3i -http://ftp.gnu.org/gnu/mtools/mtools-4.0.36.tar.gz +http://ftp.gnu.org/gnu/mtools/mtools-4.0.37.tar.gz .fi .in -0.3i .ft R @@ -82,13 +82,17 @@ All options use the \fR\&\f(CW-\fR (minus) as their first character, not Most mtools commands allow multiple filename parameters, which doesn't follow MS-DOS conventions, but which is more user-friendly. .PP -Most mtools commands allow options that instruct them how to handle file -name clashes. See section name clashes, for more details on these. All -commands accept the \fR\&\f(CW-V\fR flags which prints the version, and most -accept the \fR\&\f(CW-v\fR flag, which switches on verbose mode. In verbose -mode, these commands print out the name of the MS-DOS files upon which -they act, unless stated otherwise. See section Commands, for a description of -the options which are specific to each command. +Most mtools commands allow options that instruct them how to handle +file name clashes. See section name clashes, for more details on these. +.PP +All commands accept the \fR\&\f(CW-i\fR flag which allows to specify an +image file (See section drive letters). +.PP +All commands accept the \fR\&\f(CW-V\fR flag which prints the version, and +most accept the \fR\&\f(CW-v\fR flag, which switches on verbose mode. In +verbose mode, these commands print out the name of the MS-DOS files +upon which they act, unless stated otherwise. See section Commands, for a +description of the options which are specific to each command. .PP .SS Drive\ letters .PP @@ -479,7 +483,6 @@ floppyd_installtest mattrib mbadblocks mcd -mclasserase mcopy mdel mdeltree diff --git a/mtools.tmpl.5 b/mtools.tmpl.5 index 030ec73..d9c4d35 100644 --- a/mtools.tmpl.5 +++ b/mtools.tmpl.5 @@ -1,5 +1,5 @@ '\" t -.TH mtools 5 "21Nov21" MTOOLS MTOOLS +.TH mtools 5 "08Jan22" MTOOLS MTOOLS .SH Name mtools.conf - mtools configuration files '\" t @@ -13,7 +13,7 @@ mtools.conf - mtools configuration files .tr \(if` .tr \(pd" -.ds St Mtools\ 4.0.36 +.ds St Mtools\ 4.0.37 .PP .SH Description .PP diff --git a/mtoolstest.1 b/mtoolstest.1 index 78ef3b8..1057cfa 100644 --- a/mtoolstest.1 +++ b/mtoolstest.1 @@ -1,5 +1,5 @@ '\" t -.TH mtoolstest 1 "21Nov21" mtools-4.0.36 +.TH mtoolstest 1 "08Jan22" mtools-4.0.37 .SH Name mtoolstest - tests and displays the configuration '\" t @@ -1,5 +1,5 @@ '\" t -.TH mtype 1 "21Nov21" mtools-4.0.36 +.TH mtype 1 "08Jan22" mtools-4.0.37 .SH Name mtype - display contents of an MSDOS file '\" t @@ -1,5 +1,5 @@ '\" t -.TH mzip 1 "21Nov21" mtools-4.0.36 +.TH mzip 1 "08Jan22" mtools-4.0.37 .SH Name mzip - change protection mode and eject disk on Zip/Jaz drive '\" t diff --git a/patchlevel.c b/patchlevel.c index 41672ed..db4b905 100644 --- a/patchlevel.c +++ b/patchlevel.c @@ -18,10 +18,10 @@ #include "sysincludes.h" #include "msdos.h" -const char *mversion="4.0.36"; +const char *mversion="4.0.37"; /* Multiple releases on same day should be marked with (b), (cd), (d) after * date string below */ -const char *mdate = "November 21st, 2021"; +const char *mdate = "January 8th, 2022"; -const char *mformat_banner = "MTOO4036"; +const char *mformat_banner = "MTOO4037"; diff --git a/texinfo.tex b/texinfo.tex index 6e19429..58b6abe 100644 --- a/texinfo.tex +++ b/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2021-11-01.16} +\def\texinfoversion{2022-01-02.12} % % Copyright 1985, 1986, 1988, 1990-2021 Free Software Foundation, Inc. % @@ -3193,14 +3193,9 @@ end % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} -% definition of @key with no lozenge. If the current font is already -% monospace, don't change it; that way, we respect @kbdinputstyle. But -% if it isn't monospace, then use \tt. +% definition of @key with no lozenge. % -\def\key#1{{\setregularquotes - \nohyphenation - \ifmonospace\else\tt\fi - #1}\null} +\def\key#1{{\setregularquotes \nohyphenation \tt #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} @@ -11248,23 +11243,6 @@ directory should work if nowhere else does.} \defbodyindent = .5cm }} -% Use @smallerbook to reset parameters for 6x9 trim size. -% (Just testing, parameters still in flux.) -\def\smallerbook{{\globaldefs = 1 - \parskip = 1.5pt plus 1pt - \textleading = 12pt - % - \internalpagesizes{7.4in}{4.8in}% - {-.2in}{-.4in}% - {0pt}{14pt}% - {9in}{6in}% - % - \lispnarrowing = 0.25in - \tolerance = 700 - \contentsrightmargin = 0pt - \defbodyindent = .4cm -}} - % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt diff --git a/version.texi b/version.texi index 0f62787..cbd65ab 100644 --- a/version.texi +++ b/version.texi @@ -1,3 +1,3 @@ -@set EDITION 4.0.36 -@set VERSION 4.0.36 -@set UPDATED November 2021 +@set EDITION 4.0.37 +@set VERSION 4.0.37 +@set UPDATED January 2022 |