lpmove.c revision 37acf26adb79d43bb16f72774829c6f4655d0cc4
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
/* $Id: lpmove.c 146 2006-03-24 00:26:54Z njacobs $ */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <locale.h>
#include <libintl.h>
#include <papi.h>
#include "common.h"
static void
{
char *name;
else
name++;
gettext("Usage: %s [request-id] (destination)\n"
exit(1);
}
static int
{
int result = 0;
result = -1;
}
return (result);
}
int
{
int exit_code = 0;
char *destination = NULL;
int c;
(void) textdomain("SUNW_OST_OSCMD");
switch (c) {
case 'E':
break;
default:
}
"Failed to contact service for %s: %s\n"),
exit(1);
}
exit_code = 1;
} else { /* it's a printer */
char message[128];
int count = 0;
exit_code = 1;
} else
"destination %s is not accepting "
"requests\n"), printer);
0, 0, &jobs);
exit_code = 1;
}
exit_code = 1;
else
count++;
}
"total of %d requests moved from %s to %s\n"),
}
}
return (exit_code);
}