mirror of
https://github.com/moibenko/mtx.git
synced 2026-01-04 11:24:06 +00:00
Added patches.
This commit is contained in:
11
mtx-1.3.12/patches/mtx-1.3.12-fix-resource-leak.patch
Normal file
11
mtx-1.3.12/patches/mtx-1.3.12-fix-resource-leak.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/mtxl.c 2016-03-16 18:53:48.947779146 +0100
|
||||
+++ b/mtxl.c 2016-03-16 18:55:15.592873800 +0100
|
||||
@@ -1283,7 +1283,7 @@
|
||||
#endif
|
||||
ParseElementStatus( EmptyStorageElementAddress, &EmptyStorageElementCount,
|
||||
DataBuffer, ElementStatus, mode_sense, NULL);
|
||||
-
|
||||
+ free(DataBuffer);
|
||||
ElementStatus->StorageElementCount += ElementStatus->ImportExportCount;
|
||||
}
|
||||
|
||||
62
mtx-1.3.12/patches/mtx-1.3.12-for-shared-library.patch
Normal file
62
mtx-1.3.12/patches/mtx-1.3.12-for-shared-library.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
--- ../mtx-1.3.12/Makefile.in 2018-07-27 17:19:28.789345628 -0500
|
||||
+++ ./Makefile.in 2018-07-30 13:48:52.794193274 -0500
|
||||
@@ -13,6 +13,7 @@
|
||||
|
||||
BINS = mtx@EXEEXT@ tapeinfo@EXEEXT@ loaderinfo@EXEEXT@ scsitape@EXEEXT@ scsieject@EXEEXT@
|
||||
EXTRA_BINS = nsmhack@EXEEXT@
|
||||
+LIB=libmtx.a
|
||||
DBGS := $(BINS:%@EXEEXT@=%.dbg)
|
||||
MAN = mtx.1 tapeinfo.1 loaderinfo.1 scsitape.1 scsieject.1
|
||||
MAN_HTML := $(MAN:%.1=%.html)
|
||||
@@ -32,6 +33,7 @@
|
||||
INSTALL_DOC = $(INSTALL) -m 644
|
||||
INSTALL_BIN = $(INSTALL) -m 755
|
||||
INSTALL_DIR = $(INSTALL) -m 755 -d
|
||||
+INSTALL_LIB = $(INSTALL) -m 755
|
||||
|
||||
DESTDIR =
|
||||
prefix = @prefix@
|
||||
@@ -39,6 +41,7 @@
|
||||
sbindir = @sbindir@
|
||||
mandir = @mandir@
|
||||
srcdir = @srcdir@
|
||||
+libdir = @libdir@
|
||||
|
||||
VPATH = $(srcdir)
|
||||
|
||||
@@ -105,7 +108,7 @@
|
||||
strip $< -o $@
|
||||
endif
|
||||
|
||||
-all: $(BINS)
|
||||
+all: $(BINS) $(LIB)
|
||||
|
||||
dbgs: $(DBGS)
|
||||
|
||||
@@ -118,6 +121,7 @@
|
||||
for file in mtx.1 tapeinfo.1 scsitape.1 scsieject.1 loaderinfo.1 ; do \
|
||||
$(INSTALL_DOC) "$$file" $(DESTDIR)$(mandir)/man1 ; \
|
||||
done
|
||||
+ $(INSTALL_LIB) $(LIB) $ $(DESTDIR(libdir);
|
||||
|
||||
clean:
|
||||
rm -f *.o *~ mtx-*.zip
|
||||
@@ -134,6 +138,8 @@
|
||||
dist: distclean
|
||||
./makedist $(VERSION)
|
||||
|
||||
+libmtx: libmtx.a
|
||||
+
|
||||
loaderinfo@EXEEXT@: loaderinfo.o mtxl.o mtxl.h mtx.h $(EXTRA)
|
||||
$(CC) $(LDFLAGS) -o loaderinfo@EXEEXT@ loaderinfo.o mtxl.o $(EXTRA) $(LIBS)
|
||||
|
||||
@@ -160,6 +166,9 @@
|
||||
scsieject@EXEEXT@: scsieject.o mtxl.o mtxl.h mtx.h $(EXTRA)
|
||||
$(CC) $(LDFLAGS) -o scsieject@EXEEXT@ scsieject.o mtxl.o $(EXTRA) $(LIBS)
|
||||
|
||||
+$(LIB): mtx.o mtxl.o
|
||||
+ ar qvs $(LIB) mtx.o mtxl.o
|
||||
+
|
||||
scsieject.o: scsieject.c mtx.h mtxl.h
|
||||
|
||||
loaderinfo.o: loaderinfo.c mtx.h mtxl.h
|
||||
@@ -0,0 +1,44 @@
|
||||
From 26bf6f6794a8a35f69dc2a8a01e69bf50200800f Mon Sep 17 00:00:00 2001
|
||||
From: David Sommerseth <davids@redhat.com>
|
||||
Date: Fri, 6 May 2016 21:00:58 +0200
|
||||
Subject: [PATCH] man: Document mtx eject and previous operations
|
||||
|
||||
---
|
||||
mtx.1 | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mtx.1 b/mtx.1
|
||||
index a5e6cc6..108836e 100644
|
||||
--- a/mtx.1
|
||||
+++ b/mtx.1
|
||||
@@ -131,13 +131,16 @@ may need to eject the tape using your OS's tape control commands
|
||||
first). Note that this command may not be what you want on large
|
||||
tape libraries -- e.g. on Exabyte 220, the first slot is usually a
|
||||
cleaning tape. If <drivenum> is omitted, defaults to first drive.
|
||||
-
|
||||
.TP 10
|
||||
.B last [<drivenum>]
|
||||
Loads drive <drivenum> from the last slot in the media changer. Unloads
|
||||
the drive if there is already a tape in it. (Note: you may need to eject
|
||||
the tape using your OS's tape control commands first).
|
||||
.TP 10
|
||||
+.B previous [<drivenum>]
|
||||
+Unloads the drive and loads the previous tape in sequence. If the drive
|
||||
+was empty, loads the first tape into the drive.
|
||||
+.TP 10
|
||||
.B next [<drivenum>]
|
||||
Unloads the drive and loads the next tape in sequence. If the drive was
|
||||
empty, loads the first tape into the drive.
|
||||
@@ -145,6 +148,9 @@ empty, loads the first tape into the drive.
|
||||
.B position <slotnum>
|
||||
Positions the robot at a specific slot. Needed by some changers to
|
||||
move to and open the import/export, or mailbox, slot.
|
||||
+.TP 10
|
||||
+.B eject
|
||||
+Eject the tape currently in the drive.
|
||||
|
||||
.SH AUTHORS
|
||||
The original 'mtx' program was written by Leonard Zubkoff and extensively
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/scsitape.c b/scsitape.c
|
||||
index dd52dd5..63f4977 100644
|
||||
--- a/scsitape.c
|
||||
+++ b/scsitape.c
|
||||
@@ -63,7 +63,7 @@
|
||||
#endif
|
||||
|
||||
void Usage(void) {
|
||||
- FatalError("Usage: scsitape -f <generic-device> <command> where <command> is:\n setblk <n> | fsf <n> | bsf <n> | eod | rewind | eject | mark <n> |\n seek <n> | read [<blksize> [<numblocks]] | write [<blocksize>] \n");
|
||||
+ FatalError("Usage: scsitape -f <generic-device> <command> where <command> is:\n setblk <n> | fsf <n> | bsf <n> | eod | rewind | eject | erase |\n mark <n> | seek <n> | read [<blksize> [<numblocks]] |\n write [<blocksize>]\n");
|
||||
}
|
||||
|
||||
#define arg1 (arg[0]) /* for backward compatibility, sigh */
|
||||
Reference in New Issue
Block a user