general clean-up; Christian Weisgerber <naddy@unix-ag.uni-kl.de>

This commit is contained in:
marc 1999-03-11 20:19:28 +00:00
parent 2dc9fa879e
commit 75cfd2bc98
5 changed files with 56 additions and 53 deletions

View File

@ -3,16 +3,17 @@
# Date created: 17 Dec 1997 # Date created: 17 Dec 1997
# Whom: joey # Whom: joey
# #
# $OpenBSD: Makefile,v 1.1.1.1 1997/12/17 23:11:45 joey Exp $ # $OpenBSD: Makefile,v 1.2 1999/03/11 20:19:28 marc Exp $
# #
DISTNAME= buffer-1.17 DISTNAME= buffer-1.17
CATEGORIES= misc CATEGORIES= misc
MASTER_SITES= ftp://ftp.sun.ac.za/pub/unix/misc/ MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/ \
ftp://ftp.netbsd.org/pub/NetBSD/packages/distfiles/
MAINTAINER= joey@OpenBSD.ORG MAINTAINER= naddy@unix-ag.uni-kl.de
NO_WRKSUBDIR= yes NO_WRKSUBDIR= yes
MANL= buffer.l MAN1= buffer.1
.include <bsd.port.mk> .include <bsd.port.mk>

View File

@ -1,31 +1,42 @@
diff -udr buffer.ORG/Makefile buffer/Makefile --- Makefile.orig Wed Jul 14 17:59:17 1993
--- buffer.ORG/Makefile Wed Jul 14 17:59:17 1993 +++ Makefile Thu Mar 11 18:51:57 1999
+++ Makefile Thu Nov 16 20:09:23 1995 @@ -4,13 +4,13 @@
@@ -8,7 +8,7 @@ # You should also add -DSYS5 for Ultrix, AIX, and Solarix.
# Add -DDEF_SHMEM=n if you can only have n bytes of shared memory
# (eg: -DDEF_SHMEM=524288 if you can only have half a meg.)
-CFLAGS=
+CFLAGS+=
# Where to install buffer and its manual pages # Where to install buffer and its manual pages
INSTBIN=/usr/local/bin -INSTBIN=/usr/local/bin
-INSTMAN=/usr/man/manl -INSTMAN=/usr/man/manl
+INSTMAN=/usr/local/man/manl +INSTBIN=${PREFIX}/bin
+INSTMAN=${PREFIX}/man/man1
# The manual page section (normally l or 1) # The manual page section (normally l or 1)
S=l -S=l
+S=1
diff -udr buffer.ORG/buffer.c buffer/buffer.c RM=/bin/rm
--- buffer.ORG/buffer.c Wed Jul 14 17:59:17 1993 ALL=README buffer.man Makefile buffer.c sem.c COPYING
+++ buffer.c Fri Nov 17 20:23:58 1995 @@ -18,18 +18,14 @@
@@ -384,6 +384,7 @@ all: buffer
}
/* The interrupt handler */ buffer: buffer.o sem.o
+void - $(CC) -o buffer $(CFLAGS) buffer.o sem.o
shutdown() + $(CC) -o buffer buffer.o sem.o
{
static int shutting;
@@ -400,6 +401,7 @@
}
/* Shutdown because the child has ended */ clean:
+void $(RM) -f *.o core buffer .merrs
child_shutdown()
{ install: buffer
/* Find out which child has died. (They may not be my - rm -f $(INSTBIN)/buffer
- cp buffer $(INSTBIN)/buffer
- chmod 111 $(INSTBIN)/buffer
- rm -f $(INSTMAN)/buffer.$S
- cp buffer.man $(INSTMAN)/buffer.$S
- chmod 444 $(INSTMAN)/buffer.$S
+ ${BSD_INSTALL_PROGRAM} buffer $(INSTBIN)/buffer
+ ${BSD_INSTALL_MAN} buffer.man $(INSTMAN)/buffer.$S
buffer.tar: $(ALL)
$(RM) -f buffer.tar

View File

@ -1 +1 @@
buffer sporadic binary I/O for faster tape use Buffer sporadic binary I/O for faster tape use.

View File

@ -1,27 +1,18 @@
This is a program designed to speed up writing tapes on remote tape Buffer reads from standard input reblocking to the given blocksize
drives. Requirements are shared memory and locks which normally and writes each block to standard output.
means that these are supported in your kernel.
[for FreeBSD, this means you MUST have a kernel with Internally, buffer is a pair of processes communicating via a large
options SYSVSHM circular queue held in shared memory. This means you *must* have a
compiled in - markm] kernel with
Buffer has been tested under OpenBSD SunOS 4.0.*, SunOS 4.1.*, Solarix, options SYSVSHM
HP-UX 7.0, and Gould UTX 2.1A (sv universe).
The program splits itself into two processes. The first process reads compiled in. The reader process only has to block when the queue
(and reblocks) from stdin into a shared memory buffer. The second is full and the writer process when the queue is empty. Buffer is
writes from the shared memory buffer to stdout. Doing it this way designed to try and keep the writer side continuously busy so that
means that the writing side effectly sits in a tight write loop and it can stream when writing to tape drives. When used to write tapes
doesn't have to wait for input. Similarly for the input side. It is with an intervening network, buffer can result in a considerable
this waiting that slows down other reblocking processes, like dd. increase in throughput.
I run an archive and need to write large chunks out to tape regularly - Christian "naddy" Weisgerber
with an ethernet in the way. Using 'buffer' in a command like: <naddy@unix-ag.uni-kl.de>
tar cvf - stuff | rsh somebox "buffer > /dev/rst8"
is a factor of 5 faster than the best alternative, gnu tar with its
remote tape option:
tar cvf somebox:/dev/rst8 stuff

View File

@ -1,2 +1,2 @@
bin/buffer bin/buffer
man/manl/buffer.l man/man1/buffer.1