/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* lpusers [-q priority-level] -u (user-list | "")
lpusers -d priority-level
lpusers -l
*/
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <locale.h>
#include "lp.h"
#include "users.h"
#include "msgs.h"
#include "oam.h"
char *PRIORITY;
int
{
int fd;
short status;
extern char *optarg;
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
if(argc == 1) {
"(assign default priority limit for balance of users)\n"));
}
opterr = 0; /* disable printing of errors by getopt */
switch(c) {
case 'l':
if (list)
break;
case 'd':
if (deflt != -1)
exit(1);
}
break;
case 'q':
if (limit != -1)
exit(1);
}
break;
case 'u':
if (userlist)
break;
case '?':
if (optopt == '?')
goto usage;
else
exit(1);
}
exit(1);
}
/* invalid combination of options */
exit(1);
}
/* load existing priorities from file */
switch (errno) {
case EBADF:
break;
default:
}
exit(1);
}
if (list) {
exit (0);
} else {
if (userlist) {
if (users)
if (limit != -1) {
}
}
} else if (deflt != -1)
else
exit(1);
}
}
if (mopen()) /* error on mopen == no spooler, exit quietly */
exit(0);
goto Error;
goto Error;
if (mtype != R_LOAD_USER_FILE) {
goto NoError;
}
if (status == 0)
goto NoError;
return (0);
}