projects
/
debian
/
amanda
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 3.1.0
[debian/amanda]
/
changer-src
/
scsi-hpux.c
diff --git
a/changer-src/scsi-hpux.c
b/changer-src/scsi-hpux.c
index d0f50f771369710d0457a5c6ed6e5e7abfb1acda..1d379a88b478465628f9d3350e2690e2155fce40 100644
(file)
--- a/
changer-src/scsi-hpux.c
+++ b/
changer-src/scsi-hpux.c
@@
-24,7
+24,7
@@
* file named AUTHORS, in the root directory of this distribution.
*/
/*
* file named AUTHORS, in the root directory of this distribution.
*/
/*
- *
$Id: scsi-hpux.c,v 1.4.4.9.6.1 2002/08/22 17:41:10 martinea
Exp $
+ *
$Id: scsi-hpux.c,v 1.15 2006/05/25 01:47:07 johnfranks
Exp $
*
* scsi-chio.c -- library routines to handle the changer
* support for chio based systems
*
* scsi-chio.c -- library routines to handle the changer
* support for chio based systems
@@
-38,7
+38,6
@@
#include "amanda.h"
#include "amanda.h"
-#if defined(HAVE_HPUX_SCSI_CHIO)
# include <sys/scsi.h>
# include <sys/mtio.h> /* for eject_tape ioctls */
# include <sys/scsi.h>
# include <sys/mtio.h> /* for eject_tape ioctls */
@@
-64,7
+63,7
@@
int GetCurrentSlot(int fd)
static int get_changer_info(fd)
{
static int get_changer_info(fd)
{
-int rc = 0;
+
int rc = 0;
if (!changer_info_init) {
rc = ioctl(fd, SIOC_ELEMENT_ADDRESSES, &changer_info);
if (!changer_info_init) {
rc = ioctl(fd, SIOC_ELEMENT_ADDRESSES, &changer_info);
@@
-89,7
+88,7
@@
int get_clean_state(char *dev)
perror(dev);
return 0;
}
perror(dev);
return 0;
}
- memset(buffer, 0,
sizeof
(buffer));
+ memset(buffer, 0,
SIZEOF
(buffer));
*((int *) buffer) = 0; /* length of input data */
*(((int *) buffer) + 1) = 100; /* length of output buffer */
*((int *) buffer) = 0; /* length of input data */
*(((int *) buffer) + 1) = 100; /* length of output buffer */
@@
-157,7
+156,7
@@
int rc;
rc = ioctl(fd, SIOC_ELEMENT_STATUS, &es);
if (rc) {
rc = ioctl(fd, SIOC_ELEMENT_STATUS, &es);
if (rc) {
-
fprintf(stderr, "%s: element status query failed: 0x%x %s\n"
,
+
g_fprintf(stderr, _("%s: element status query failed: 0x%x %s\n")
,
get_pname(), rc, strerror(errno));
return(-1);
}
get_pname(), rc, strerror(errno));
return(-1);
}
@@
-168,7
+167,7
@@
int rc;
/*
* find the first empty slot
*/
/*
* find the first empty slot
*/
-int find_empty(int fd)
+int find_empty(int fd
, int start, int count
)
{
struct element_status es;
int i, rc;
{
struct element_status es;
int i, rc;
@@
-183,7
+182,7
@@
int i, rc;
&& !rc && es.full);
if (rc) {
&& !rc && es.full);
if (rc) {
-
fprintf(stderr,"%s: element status query failed: 0x%x %s\n"
,
+
g_fprintf(stderr,_("%s: element status query failed: 0x%x %s\n")
,
get_pname(), rc, strerror(errno));
return -1;
}
get_pname(), rc, strerror(errno));
return -1;
}
@@
-204,7
+203,7
@@
int i,rc;
rc = ioctl(fd, SIOC_ELEMENT_STATUS, &es);
if (rc) {
rc = ioctl(fd, SIOC_ELEMENT_STATUS, &es);
if (rc) {
-
fprintf(stderr,"%s: drive status quer failed: 0x%x %s\n"
,
+
g_fprintf(stderr,_("%s: drive status quer failed: 0x%x %s\n")
,
get_pname(), rc, strerror(errno));
return(-1);
}
get_pname(), rc, strerror(errno));
return(-1);
}
@@
-234,7
+233,7
@@
int rc;
rc = ioctl(fd, SIOC_MOVE_MEDIUM, &move);
if (rc){
rc = ioctl(fd, SIOC_MOVE_MEDIUM, &move);
if (rc){
-
fprintf(stderr,"%s: move medium command failed: 0x%x %s\n"
,
+
g_fprintf(stderr,_("%s: move medium command failed: 0x%x %s\n")
,
get_pname(), rc, strerror(errno));
return(-2);
}
get_pname(), rc, strerror(errno));
return(-2);
}
@@
-264,7
+263,7
@@
int rc;
rc = ioctl(fd, SIOC_MOVE_MEDIUM,&move);
if (rc){
rc = ioctl(fd, SIOC_MOVE_MEDIUM,&move);
if (rc){
-
fprintf(stderr,"%s: drive load failed (MOVE): 0x%x %s\n"
,
+
g_fprintf(stderr,_("%s: drive load failed (MOVE): 0x%x %s\n")
,
get_pname(), rc, strerror(errno));
return(-2);
}
get_pname(), rc, strerror(errno));
return(-2);
}
@@
-277,7
+276,7
@@
int rc;
rc = get_changer_info(fd);
if (rc) {
rc = get_changer_info(fd);
if (rc) {
-
fprintf(stderr, "%s: storage size query failed: 0x%x %s\n"
, get_pname(),
+
g_fprintf(stderr, _("%s: storage size query failed: 0x%x %s\n")
, get_pname(),
rc, strerror(errno));
return -1;
}
rc, strerror(errno));
return -1;
}
@@
-292,7
+291,7
@@
int get_drive_count(int fd)
rc = get_changer_info(fd);
if (rc) {
rc = get_changer_info(fd);
if (rc) {
-
fprintf(stderr, "%s: drive count query failed: 0x%x %s\n"
, get_pname(),
+
g_fprintf(stderr, _("%s: drive count query failed: 0x%x %s\n")
, get_pname(),
rc, strerror(errno));
return -1;
}
rc, strerror(errno));
return -1;
}
@@
-326,15
+325,15
@@
int OpenDevice(char * tapedev)
int DeviceFD;
DeviceFD = open(tapedev, O_RDWR);
int DeviceFD;
DeviceFD = open(tapedev, O_RDWR);
+ dbprintf(_("OpenDevice(%s) returns %d\n"), tapedev, DeviceFD);
return(DeviceFD);
}
return(DeviceFD);
}
-int CloseDevice(int DeviceFD)
+int CloseDevice(
char *device,
int DeviceFD)
{
int ret;
ret = close(DeviceFD);
{
int ret;
ret = close(DeviceFD);
+ dbprintf(_("CloseDevice(%s) returns %d\n"), device, ret);
return(ret);
}
return(ret);
}
-
-#endif