DragonFly On-Line Manual Pages

Search: Section:  


encap_check_target(3)           C Library Calls          encap_check_target(3)

NAME

encap_check_target, encap_check_source - Encap file verification routines

SYNOPSIS

#include <encap.h> int encap_check_target(char *encap_source, char *tgt_path, encap_target_info_t *tgtinfo); int encap_check_source(ENCAP *encap, char *dir, char *file, encap_source_info_t *srcinfo);

VERSION

This man page documents version 2.3 of libencap.

DESCRIPTION

The encap_check_target() function checks the status of the target file tgt_path and sets the fields of tgtinfo to describe it. The most important field of tgtinfo is the tgt_flags field, which is comprised of zero or more of the following values or'ed together: TGT_EXISTS The target file exists. TGT_ISDIR The target file is a directory. TGT_ISLNK The target file is a symlink. TGT_DEST_EXISTS The target link points to an existing file. TGT_DEST_ISDIR The target link points to a directory. TGT_DEST_ENCAP_SRC The target link points somewhere under the Encap Source directory. TGT_DEST_PKGDIR_EXISTS The target link points to an existing package directory. If TGT_ISLNK is set in tgt_flags, the tgt_link_existing field is set to the path that the link points to. If TGT_DEST_ENCAP_SRC is set in tgt_flags, the tgt_link_existing_pkg and tgt_link_existing_pkgdir_relative fields are set to point to the package and the path relative to the package directory which the link points to, respectively. The encap_check_source() function sets the fields of the srcinfo structure to describe the Encap source file whose path is encap->e_source/encap->e_pkgname/dir/file. The most important field of srcinfo is the src_flags field, which is comprised of zero or more of the following values or'ed together: SRC_REQUIRED The symlink for this file must be created successfully in order for installation of the package referenced by encap to succeed. SRC_LINKDIR The file is a subdirectory, but should be linked directly rather than recursively linking its contents. SRC_EXCLUDED The file matches an exclude entry and should not be processed. SRC_ISDIR The file is a directory. SRC_ISLNK The file is a symlink.

RETURN VALUES

The encap_check_target() and encap_check_source() functions return 0 on success, or -1 on failure (and set errno).

SEE ALSO

encap_open(3) University of Illinois Oct 2002 encap_check_target(3)

Search: Section: