4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
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.
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]
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
37 #include <sys/types.h>
43 ppkgmap(struct cfent
*ept
, FILE *fp
)
45 if (ept
->path
== NULL
)
49 if (fprintf(fp
, "%d ", ept
->volno
) < 0)
53 if (ept
->ftype
== 'i') {
54 if (fprintf(fp
, "%c %s", ept
->ftype
, ept
->path
) < 0)
57 if (fprintf(fp
, "%c %s %s", ept
->ftype
, ept
->pkg_class
,
62 if (ept
->ainfo
.local
) {
63 if (fprintf(fp
, "=%s", ept
->ainfo
.local
) < 0)
67 if (strchr("cb", ept
->ftype
)) {
68 if (ept
->ainfo
.major
== BADMAJOR
) {
69 if (fprintf(fp
, " ?") < 0)
72 if (fprintf(fp
, " %ld", ept
->ainfo
.major
) < 0)
75 if (ept
->ainfo
.minor
== BADMINOR
) {
76 if (fprintf(fp
, " ?") < 0)
79 if (fprintf(fp
, " %ld", ept
->ainfo
.minor
) < 0)
84 if (strchr("dxcbpfve", ept
->ftype
)) {
85 if (fprintf(fp
, ((ept
->ainfo
.mode
== BADMODE
) ? " ?" : " %04o"),
88 if (fprintf(fp
, " %s %s", ept
->ainfo
.owner
, ept
->ainfo
.group
) <
93 if (fputc('\n', fp
) == EOF
)
98 if (strchr("ifve", ept
->ftype
)) {
99 if (fprintf(fp
, ((ept
->cinfo
.size
== BADCONT
) ? " ?" : " %llu"),
100 ept
->cinfo
.size
) < 0)
102 if (fprintf(fp
, ((ept
->cinfo
.cksum
== BADCONT
) ? " ?" : " %ld"),
103 ept
->cinfo
.cksum
) < 0)
106 ((ept
->cinfo
.modtime
== BADCONT
) ? " ?" : " %ld"),
107 ept
->cinfo
.modtime
) < 0)
111 if (ept
->ftype
== 'i') {
112 if (fputc('\n', fp
) == EOF
)
116 if (fprintf(fp
, "\n") < 0)