diff options
Diffstat (limited to 'sysutils/amanda-server/patches/patch-aa')
-rw-r--r-- | sysutils/amanda-server/patches/patch-aa | 195 |
1 files changed, 164 insertions, 31 deletions
diff --git a/sysutils/amanda-server/patches/patch-aa b/sysutils/amanda-server/patches/patch-aa index 35ce7e29f3e..9d8cbcd9e30 100644 --- a/sysutils/amanda-server/patches/patch-aa +++ b/sysutils/amanda-server/patches/patch-aa @@ -1,32 +1,165 @@ -$NetBSD: patch-aa,v 1.4 2001/01/16 21:59:39 cjones Exp $ +$NetBSD: patch-aa,v 1.5 2004/05/12 18:45:26 bouyer Exp $ ---- configure.orig Sat Nov 25 06:59:40 2000 -+++ configure Mon Jan 15 14:08:27 2001 -@@ -3268,6 +3268,7 @@ - done - - -+if false ;then - for ac_prog in gnuplot - do - # Extract the first word of "$ac_prog", so it can be a program name with args. -@@ -3307,6 +3308,8 @@ - - test -n "$GNUPLOT" && break - done -+fi -+GNUPLOT="" - - if test -z "$GNUPLOT"; then - NO_AMPLOT_MODE=true -@@ -4924,8 +4927,10 @@ - # This can be used to rebuild libtool when needed - LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" - -+if false; then - # Always use our own libtool. - LIBTOOL='$(SHELL) $(top_builddir)/libtool' -+fi - - # Redirect the config.log output again, so that the ltconfig log is not - # clobbered by the next message. +--- changer-src/scsi-chio.c.orig Thu Jun 17 12:33:19 1999 ++++ changer-src/scsi-chio.c Thu Jan 11 13:01:33 2001 +@@ -121,25 +121,41 @@ + */ + int isempty(int fd, int slot) + { ++#if defined(OCHIOGSTATUS) ++struct ochanger_element_status_request cesr; ++#else + struct changer_element_status ces; ++#endif ++ + int i,rc; + int type=CHET_ST; + + get_changer_info(fd); + ++#if defined(OCHIOGSTATUS) ++ cesr.cesr_type = type; ++ cesr.cesr_data = malloc(changer_info.cp_nslots); ++ rc = ioctl(fd, OCHIOGSTATUS, &cesr); ++#else + ces.ces_type = type; + ces.ces_data = malloc(changer_info.cp_nslots); +- + rc = ioctl(fd, CHIOGSTATUS, &ces); ++#endif ++ + if (rc) { + dbprintf(("%s: changer status query failed: 0x%x %s\n", + get_pname(), rc,strerror(errno))); + return -1; + } + ++#if defined(OCHIOGSTATUS) ++ i = cesr.cesr_data[slot] & CESTATUS_FULL; ++ free(cesr.cesr_data); ++#else + i = ces.ces_data[slot] & CESTATUS_FULL; +- + free(ces.ces_data); ++#endif ++ + return !i; + } + +@@ -148,16 +164,27 @@ + */ + int find_empty(int fd, int start, int count) + { ++#if defined(OCHIOGSTATUS) ++struct ochanger_element_status_request cesr; ++#else + struct changer_element_status ces; ++#endif ++ + int i,rc; + int type=CHET_ST; + + get_changer_info(fd); + ++#if defined(OCHIOGSTATUS) ++ cesr.cesr_type = type; ++ cesr.cesr_data = malloc(changer_info.cp_nslots); ++ rc = ioctl(fd, OCHIOGSTATUS, &cesr); ++#else + ces.ces_type = type; + ces.ces_data = malloc(changer_info.cp_nslots); ++ rc = ioctl(fd, CHIOGSTATUS, &ces); ++#endif + +- rc = ioctl(fd,CHIOGSTATUS,&ces); + if (rc) { + dbprintf(("%s: changer status query failed: 0x%x %s\n", + get_pname(), rc, strerror(errno))); +@@ -165,9 +192,17 @@ + } + + i = 0; ++ ++#if defined(OCHIOGSTATUS) ++ while ((i < changer_info.cp_nslots)&&(cesr.cesr_data[i] & CESTATUS_FULL)) ++ i++; ++ free(cesr.cesr_data); ++#else + while ((i < changer_info.cp_nslots)&&(ces.ces_data[i] & CESTATUS_FULL)) + i++; + free(ces.ces_data); ++#endif ++ + return i; + } + +@@ -176,25 +211,41 @@ + */ + int drive_loaded(int fd, int drivenum) + { ++#if defined(OCHIOGSTATUS) ++struct ochanger_element_status_request cesr; ++#else + struct changer_element_status ces; ++#endif ++ + int i,rc; + int type=CHET_DT; + + get_changer_info(fd); + ++#if defined(OCHIOGSTATUS) ++ cesr.cesr_type = type; ++ cesr.cesr_data = malloc(changer_info.cp_ndrives); ++ rc = ioctl(fd, OCHIOGSTATUS, &cesr); ++#else + ces.ces_type = type; + ces.ces_data = malloc(changer_info.cp_ndrives); +- + rc = ioctl(fd, CHIOGSTATUS, &ces); ++#endif ++ + if (rc) { + dbprintf(("%s: drive status query failed: 0x%x %s\n", + get_pname(), rc, strerror(errno))); + return -1; + } + ++#if defined(OCHIOGSTATUS) ++ i = (cesr.cesr_data[drivenum] & CESTATUS_FULL); ++ free(cesr.cesr_data); ++#else + i = (ces.ces_data[drivenum] & CESTATUS_FULL); +- + free(ces.ces_data); ++#endif ++ + return i; + } + +@@ -204,7 +255,12 @@ + */ + int unload(int fd, int drive, int slot) + { ++#if defined(OCHIOGSTATUS) ++struct changer_move_request move; ++#else + struct changer_move move; ++#endif ++ + int rc; + + dbprintf(("unload : fd = %d, drive = %d, slot =%d\n",fd, drive, slot)); +@@ -230,7 +286,12 @@ + */ + int load(int fd, int drive, int slot) + { ++#if defined(OCHIOGSTATUS) ++struct changer_move_request move; ++#else + struct changer_move move; ++#endif ++ + int rc; + + dbprintf(("load : fd = %d, drive = %d, slot =%d\n",fd, drive, slot)); |