/*
* 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.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
#include <stdio.h>
#include <string.h>
#include <limits.h>
#include "pkgstrct.h"
#include "pkglib.h"
/*
* Name: putcfile
* Description: Write contents file entry to specified FILE
* Arguments: struct cfent a_ept - data for contents file entry
* FILE *a_fp - FP of file to write contents file entry to
* Notes: This is identical to putcvfpfile() but this function takes a
* stdio FILE* file to write to instead of a VFP_T file. It is
* MUCH slower than putcvfpfile().
*/
int
{
return (0); /* no ifiles stored in contents DB */
}
return (-1); /* no path name - no entry to write */
}
return (-1);
}
return (-1);
}
return (-1);
}
return (-1);
}
}
return (-1);
}
return (-1);
}
return (-1);
}
return (-1);
}
return (-1);
}
return (-1);
}
} else {
return (-1);
}
return (-1);
}
return (-1);
}
} else {
return (-1);
}
}
return (-1);
return (-1);
}
return (-1);
}
return (-1);
}
return (-1);
}
}
return (-1);
return (-1);
return (-1);
}
while (pinfo) {
return (-1);
}
return (-1);
}
}
return (-1);
}
return (-1);
}
}
return (-1);
}
return (-1);
}
}
}
return (-1);
}
return (0);
}
/*
* Name: putcvfpfile
* Description: Write contents file entry to specified VFP
* Arguments: struct cfent a_ept - data for contents file entry
* VFP_T *a_vfp - VFP of file to write contents file entry to
* Notes: This is identical to putcfile() but this function takes a
* VFP_T file to write to instead of a stdio FILE file. It is
* MUCH faster tha putcfile().
*/
int
{
/* contents file does not maintain any 'i' file entries */
return (0);
}
/* cannot create an entry if it has no file name */
return (-1);
}
/*
* Format of contents file line could be one of:
* /dir d class mode owner group SUNWxxx SUNWyyy
* /file f class mode owner group size cksum modtime SUNWxxx
* /file x class mode owner group SUNWppro
* /file v class mode owner group size cksum modtime SUNWxxx
* /file e class mode owner group size cksum modtime SUNWxxx
* The package name could be prefixed by one of the following
* status indicators: +-*!%@#~
*/
/*
* Adding an entry to the specified VFP. During normal processing the
* contents file is copied to a temporary contents file and entries are
* added as appropriate. When this processing is completed, a decision
* is made on whether or not to overwrite the real contents file with
* the contents of the temporary contents file. If the temporary
* contents file is just a copy of the real contents file then there is
* no need to overwrite the real contents file with the contents of the
* temporary contents file. This decision is made in part on whether
* or not any new or modified entries have been added to the temporary
* contents file. Set the "data is modified" indication associated
* with this VFP so that the real contents file is overwritten when
* processing is done.
*/
(void) vfpSetModified(a_vfp);
/* write initial path [all entries] */
/* if link, write out '=' portion */
}
/* if volume, write it out */
}
/* write out <space><entry type><space>class> */
/* major device number */
} else {
}
/* minor device number */
} else {
}
}
/* if dxcbpfve, write out mode, owner, group */
/* mode */
/* owner */
/* group */
}
/* if f/v/e, write out size, cksum, modtime */
/* size */
/* cksum */
/* modtime */
}
/* write out list of all packages referencing this entry */
while (pinfo) {
}
}
}
}
return (0);
}