Subject: Re: amanda
To: maximum entropy <entropy@zippy.bernstein.com>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-pkg
Date: 01/24/2000 00:12:34
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
On Mon, Jan 24, 2000 at 12:09:46AM +0100, Manuel Bouyer wrote:
> On Sat, Jan 22, 2000 at 06:22:33PM -0500, maximum entropy wrote:
> > Earlier I wrote:
> >
> > >In this case, the changes necessary to support 1.4.1 should also give
> > >support for earlier releases. So I'll go ahead and put together a
> > >patch.
> >
> > Well, I haven't had much success...with the patch amanda will compile,
> > but it doesn't seem to be driving my changer properly.
>
> Could you try the appened patch to pkgsrc ?
Grrr, again I forgot to attach the file.
Here it is.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--
--7AUc2qLy4jB3hD7Z
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=amanda_patches
Index: amanda-client/files/patch-sum
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/amanda-client/files/patch-sum,v
retrieving revision 1.3
diff -u -r1.3 patch-sum
--- patch-sum 1999/09/06 18:09:05 1.3
+++ patch-sum 2000/01/23 23:04:47
@@ -2,7 +2,7 @@
MD5 (patch-aa) = 6b367d0b59e5ef883734a896edbb2623
MD5 (patch-ab) = 488f351bda45b411c260bd3d8ee7f6f9
-MD5 (patch-ac) = 3168a2b696288eaf9feb148eb5fb7831
+MD5 (patch-ac) = e696718ee8c52a4da0a2133d9c0e2613
MD5 (patch-ad) = fa20c139b28094d4b7a848f16ffcb9e3
MD5 (patch-ae) = 1178c5d7cd28a8230df4bffe33dd99a7
MD5 (patch-af) = 9115d1218ee47e59b7dc68dd09fef71f
Index: amanda-client/patches/patch-ac
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/amanda-client/patches/patch-ac,v
retrieving revision 1.3
diff -u -r1.3 patch-ac
--- patch-ac 1999/09/04 01:07:29 1.3
+++ patch-ac 2000/01/23 23:04:47
@@ -1,13 +1,17 @@
-$NetBSD: patch-ac,v 1.3 1999/09/04 01:07:29 bad Exp $
+$NetBSD: patch-ab,v 1.3 1999/09/04 01:07:29 bad Exp $
---- Makefile.in.old Tue Feb 23 10:37:10 1999
-+++ Makefile.in Tue Feb 23 10:38:36 1999
-@@ -157,7 +157,7 @@
+--- Makefile.in.orig Sat Nov 21 18:32:54 1998
++++ Makefile.in Sun Jan 23 23:47:08 2000
+@@ -157,9 +157,9 @@
AUTOCONF = @AUTOCONF@ --localdir=config
SUBDIRS=config \
- common-src client-src tape-src \
+- server-src restore-src recover-src \
+- changer-src amplot man \
+ client-src tape-src \
- server-src restore-src recover-src \
- changer-src amplot man \
++ restore-src recover-src \
++ amplot man \
example
+
+ EXTRA_DIST = \
Index: amanda-common/files/patch-sum
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/amanda-common/files/patch-sum,v
retrieving revision 1.2
diff -u -r1.2 patch-sum
--- patch-sum 1999/11/12 16:07:32 1.2
+++ patch-sum 2000/01/23 23:04:47
@@ -4,3 +4,4 @@
MD5 (patch-ab) = 2eaacdc2ccf0db3fe126cbc88eb36d26
MD5 (patch-ac) = 2dcc4ba64e249c61c0a303f10303683a
MD5 (patch-ad) = 5d6a750fa5d7d1d26483b52790f82f0e
+MD5 (patch-ae) = b1db75fb6e6a3516cb7507fb7c77fda3
Index: amanda-common/patches/patch-ae
===================================================================
RCS file: patch-ae
diff -N patch-ae
--- /dev/null Sun Jan 23 04:18:04 2000
+++ patch-ae Sun Jan 23 15:04:47 2000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ad,v 1.1 1999/04/21 14:14:33 agc Exp $
+
+--- Makefile.in.orig Sun Jan 23 23:43:37 2000
++++ Makefile.in Sun Jan 23 23:44:29 2000
+@@ -157,9 +157,9 @@
+ AUTOCONF = @AUTOCONF@ --localdir=config
+
+ SUBDIRS=config \
+ common-src client-src tape-src \
+- server-src restore-src recover-src \
+- changer-src amplot man \
++ restore-src recover-src \
++ amplot man \
+ example
+
+ EXTRA_DIST = \
Index: amanda-server/files/patch-sum
===================================================================
RCS file: /cvsroot/pkgsrc/sysutils/amanda-server/files/patch-sum,v
retrieving revision 1.3
diff -u -r1.3 patch-sum
--- patch-sum 1999/09/06 18:17:05 1.3
+++ patch-sum 2000/01/23 23:04:47
@@ -8,3 +8,4 @@
MD5 (patch-af) = ad691c5f446498750a993e2857e57132
MD5 (patch-ag) = b7df4171bf9a4daa9e7e4bd024857b10
MD5 (patch-ah) = 0abf39e69917329b3103e28fb7d47632
+MD5 (patch-ai) = 8b063aa40c559725df8fe4175c9feeb7
Index: amanda-server/patches/patch-ai
===================================================================
RCS file: patch-ai
diff -N patch-ai
--- /dev/null Sun Jan 23 04:18:04 2000
+++ patch-ai Sun Jan 23 15:04:47 2000
@@ -0,0 +1,131 @@
+$NetBSD: patch-ad,v 1.1 1999/04/21 14:14:33 agc Exp $
+
+--- changer-src/scsi-chio.c.orig Sun Jan 23 22:54:29 2000
++++ changer-src/scsi-chio.c Sun Jan 23 23:14:22 2000
+@@ -119,14 +119,17 @@
+ */
+ int isempty(int fd, int slot)
+ {
++struct changer_element_status_request ces_rq;
+ struct changer_element_status ces;
+-int i,rc;
+-int type=CHET_ST;
++int rc;
+
+ get_changer_info(fd);
+
+- ces.ces_type = type;
+- ces.ces_data = malloc(changer_info.cp_nslots);
++ ces_rq.cesr_type = CHET_ST;
++ ces_rq.cesr_unit = slot;
++ ces_rq.cesr_count = 1;
++ ces_rq.cesr_flags = 0;
++ ces_rq.cesr_data = &ces;
+
+ rc = ioctl(fd, CHIOGSTATUS, &ces);
+ if (rc) {
+@@ -135,10 +138,7 @@
+ return -1;
+ }
+
+- i = ces.ces_data[slot] & CESTATUS_FULL;
+-
+- free(ces.ces_data);
+- return !i;
++ return ((ces.ces_flags & CESTATUS_FULL) == 0);
+ }
+
+ /*
+@@ -146,16 +146,19 @@
+ */
+ int find_empty(int fd)
+ {
+-struct changer_element_status ces;
+-int i,rc;
+-int type=CHET_ST;
++struct changer_element_status_request ces_rq;
++int rc, i;
+
+ get_changer_info(fd);
+
+- ces.ces_type = type;
+- ces.ces_data = malloc(changer_info.cp_nslots);
++ ces_rq.cesr_type = CHET_ST;
++ ces_rq.cesr_unit = 0;
++ ces_rq.cesr_count = changer_info.cp_nslots;
++ ces_rq.cesr_flags = 0;
++ ces_rq.cesr_data = malloc(sizeof(struct changer_element_status) *
++ changer_info.cp_nslots);
+
+- rc = ioctl(fd,CHIOGSTATUS,&ces);
++ rc = ioctl(fd,CHIOGSTATUS,&ces_rq);
+ if (rc) {
+ fprintf(stderr,"%s: changer status query failed: 0x%x %s\n",
+ get_pname(), rc, strerror(errno));
+@@ -163,9 +166,10 @@
+ }
+
+ i = 0;
+- while ((i < changer_info.cp_nslots)&&(ces.ces_data[i] & CESTATUS_FULL))
++ while ((i < changer_info.cp_nslots) &&
++ (ces_rq.cesr_data[i].ces_flags & CESTATUS_FULL))
+ i++;
+- free(ces.ces_data);
++ free(ces_rq.cesr_data);
+ return i;
+ }
+
+@@ -174,26 +178,26 @@
+ */
+ int drive_loaded(int fd, int drivenum)
+ {
++struct changer_element_status_request ces_rq;
+ struct changer_element_status ces;
+-int i,rc;
+-int type=CHET_DT;
++int rc;
+
+ get_changer_info(fd);
+
+- ces.ces_type = type;
+- ces.ces_data = malloc(changer_info.cp_ndrives);
++ ces_rq.cesr_type = CHET_DT;
++ ces_rq.cesr_unit = drivenum;
++ ces_rq.cesr_count = 1;
++ ces_rq.cesr_flags = 0;
++ ces_rq.cesr_data = &ces;
+
+- rc = ioctl(fd, CHIOGSTATUS, &ces);
++ rc = ioctl(fd, CHIOGSTATUS, &ces_rq);
+ if (rc) {
+ fprintf(stderr,"%s: drive status query failed: 0x%x %s\n",
+ get_pname(), rc, strerror(errno));
+ return -1;
+ }
+
+- i = (ces.ces_data[drivenum] & CESTATUS_FULL);
+-
+- free(ces.ces_data);
+- return i;
++ return (ces.ces_flags & CESTATUS_FULL);
+ }
+
+
+@@ -202,7 +206,7 @@
+ */
+ int unload(int fd, int drive, int slot)
+ {
+-struct changer_move move;
++struct changer_move_request move;
+ int rc;
+
+ move.cm_fromtype = CHET_DT;
+@@ -226,7 +230,7 @@
+ */
+ int load(int fd, int drive, int slot)
+ {
+-struct changer_move move;
++struct changer_move_request move;
+ int rc;
+
+ move.cm_fromtype = CHET_ST;
--7AUc2qLy4jB3hD7Z--