/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#pragma ident "%Z%%M% %I% %E% SMI"
/* EMACS_MODES: !fill, lnumb, !overwrite, !nodelete, !picture */
#include "lpsched.h"
#include <syslog.h>
static char *
{
int peLen;
reason += 3;
while (*reason == ' ')
reason++;
pe = "PrinterError:";
*ptr = 0;
*pe = ' ';
*pe = 0;
pe--;
}
return(reason);
}
/**
** printer_fault() - RECOGNIZE PRINTER FAULT
**/
void
int err)
{
/* -F wait */
/* -F beginning */
/* -F continue AND the interface program died */
}
if (err) {
} else if (! alert_text)
else
if (!why)
why = alert_text;
else
note("printer fault. type: %s, status: %x\nmsg: (%s)\n",
else {
}
if (why != alert_text)
}
/**
** clear_printer_fault() - RECOGNIZE PRINTER FAULT
**/
void
{
else
if (why != alert_text)
}
/**
** dial_problem() - ADDRESS DIAL-OUT PROBLEM
**/
void
{
static struct problem {
char *reason;
int retry_max,
} problems[] = {
"DIAL FAILED", 10, 2, /* D_HUNG */
"CALLER SCRIPT FAILED", 10, 3, /* NO_ANS */
"CAN'T ACCESS DEVICE", 0, 6, /* L_PROB */
"DEVICE LOCKED", 20, 8, /* DV_NT_A */
"NO DEVICES AVAILABLE", 0, 10, /* NO_BD_A */
"SYSTEM NOT IN Systems FILE", 0, 13, /* BAD_SYS */
"UNKNOWN dial() FAILURE", 0, 0
};
register struct problem *p;
register char *msg;
#define SUFFIX "This problem has occurred several times.\nPlease check the dialing instructions for this printer.\n"
for (p = problems; p->dial_error; p++)
if (p->dial_error == rc)
break;
if (!p->retry_max) {
);
}
}
return;
}