rmdest.c (7c478bd9) rmdest.c (45916cd2)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23/* All Rights Reserved */
24
25
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
22/* All Rights Reserved */
23
24
26#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.1 */
25#pragma ident "%Z%%M% %I% %E% SMI"
27
26
27/*
28 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
29 * Use is subject to license terms.
30 */
31
28#include "stdio.h"
29#include "ctype.h"
30#include "errno.h"
31#include "sys/types.h"
32
33#include "lp.h"
34#include "msgs.h"
35#include "access.h"

--- 62 unchanged lines hidden (view full) ---

98 * the same with the disk copies.
99 */
100 if (!aclass)
101 fromallclasses (dest);
102
103 if (STREQU(getdflt(), dest))
104 newdflt (NAME_NONE);
105
32#include "stdio.h"
33#include "ctype.h"
34#include "errno.h"
35#include "sys/types.h"
36
37#include "lp.h"
38#include "msgs.h"
39#include "access.h"

--- 62 unchanged lines hidden (view full) ---

102 * the same with the disk copies.
103 */
104 if (!aclass)
105 fromallclasses (dest);
106
107 if (STREQU(getdflt(), dest))
108 newdflt (NAME_NONE);
109
110 if (system_labeled) {
111 update_dev_dbs(dest, NULL, "REMOVE");
112 }
106 break;
107
108 case MBUSY:
109 LP_ERRMSG1 (ERROR, E_ADM_DESTBUSY, dest);
110 done (1);
111
112 case MNOPERM: /* taken care of up front */
113 default:
114 LP_ERRMSG1 (ERROR, E_LP_BADSTATUS, rc);
115 done (1);
116 break;
117
118 }
119 return;
120}
113 break;
114
115 case MBUSY:
116 LP_ERRMSG1 (ERROR, E_ADM_DESTBUSY, dest);
117 done (1);
118
119 case MNOPERM: /* taken care of up front */
120 default:
121 LP_ERRMSG1 (ERROR, E_LP_BADSTATUS, rc);
122 done (1);
123 break;
124
125 }
126 return;
127}