encap_close man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

encap_open(3)			C Library Calls			 encap_open(3)

NAME
       encap_open, encap_close - manage Encap package handles

SYNOPSIS
       #include <encap.h>
       #include <stdarg.h>

       typedef	int  (*encap_print_func_t)(ENCAP  *encap,  encap_source_info_t
       *srcinfo, encap_target_info_t *tgtinfo, unsigned int type,  char	 *fmt,
       ...);

       int  encap_open(ENCAP  **encap,	char *source, char *target, char *pkg‐
       name, unsigned long options, encap_print_func_t print_func);

       void encap_close(ENCAP *encap);

VERSION
       This man page documents version 2.3 of libencap.

DESCRIPTION
       The encap_open() function creates an ENCAP handle associated  with  the
       Encap  package  pkgname.	  This	handle can be passed to other libencap
       functions to manipulate Encap packages.

       The options argument is a bitwise-or of zero or more of the following:

       OPT_FORCE
	      Force operations to succeed whenever possible.

       OPT_SHOWONLY
	      Determine what would be done, but do not actually do it.

       OPT_ABSLINKS
	      Use absolute symlinks instead of relative symlinks.

       OPT_PREREQS
	      Check prerequisites before installation.

       OPT_RUNSCRIPTS
	      Run package scripts.

       OPT_EXCLUDES
	      Honor package exclusions.

       OPT_RUNSCRIPTSONLY
	      Run package scripts, but do not attempt to link or remove files.

       OPT_NUKETARGETDIRS
	      Remove empty target directories.

       OPT_PKGDIRLINKS
	      Link files directly from the package directory.

       OPT_LINKDIRS
	      Honor package linkdir directives.

       OPT_LINKNAMES
	      Honor package linkname directives.

       OPT_TARGETEXCLUDES
	      Honor encap.exclude files under the target directory.  (This  is
	      used  when  cleaning the Encap target; see encap_target_clean(3)
	      for more information.)

       The print_func function is used by libencap to communicate its  actions
       to  the	calling	 application.	The encap argument is the ENCAP handle
       associated with the package being processed.  The srcinfo  and  tgtinfo
       structures  describe  the  file being processed, but may be set to NULL
       for errors which are not associated with a  specific  file.   The  type
       argument denotes the disposition using one of the following values:

       EPT_INST_OK
	      Installation  of the link or directory corresponding to the file
	      described by srcinfo has succeeded.

       EPT_INST_REPL
	      Installation of the link or directory corresponding to the  file
	      described	 by srcinfo has succeeded, but a pre-existing link was
	      replaced in the process.

       EPT_INST_FAIL
	      Installation of the link or directory corresponding to the  file
	      described by srcinfo has failed due to an Encap conflict.

       EPT_INST_ERROR
	      Installation  of the link or directory corresponding to the file
	      described by srcinfo has failed due to a system or library  call
	      error, and errno is set to indicate the error.

       EPT_INST_NOOP
	      The link or directory which corresponds to the file described by
	      srcinfo is already installed, so no action was necessary.

       EPT_REM_OK
	      Removal of the link  or  directory  corresponding	 to  the  file
	      described by srcinfo has succeeded.

       EPT_REM_FAIL
	      Removal  of  the	link  or  directory  corresponding to the file
	      described by srcinfo has failed due to an Encap conflict.

       EPT_REM_ERROR
	      Removal of the link  or  directory  corresponding	 to  the  file
	      described	 by srcinfo has failed due to a system or library call
	      error, and errno is set to indicate the error.

       EPT_REM_NOOP
	      The link or directory which corresponds to the file described by
	      srcinfo is already removed, so no action was necessary.

       EPT_CHK_NOOP
	      The link or directory which corresponds to the file described by
	      srcinfo is properly installed.

       EPT_CHK_FAIL
	      The link or directory which corresponds to the file described by
	      srcinfo is not properly installed.

       EPT_CHK_ERROR
	      Checking	of  the	 link  or  directory corresponding to the file
	      described by srcinfo has failed due to a system or library  call
	      error, and errno is set to indicate the error.

       EPT_PKG_INFO
	      Informational  message about the package, such as files that are
	      excluded or prerequisites which are successfully processed.

       EPT_PKG_FAIL
	      General package failure, such as a failed prerequisite.

       EPT_PKG_ERROR
	      General package failure due to a system or library  call	error.
	      In this case, errno is set to indicate the error.

       EPT_PKG_RAW
	      Raw  output,  such as the output of a package script or the con‐
	      tents of a README file.

       EPT_CLN_OK
	      The stale Encap link whose path is srcinfo->src_target_path  was
	      removed successfully.

       EPT_CLN_INFO
	      Informational message during target cleaning, such as files that
	      are excluded.

       EPT_CLN_FAIL
	      General target cleaning failure, such as a file directly in tar‐
	      get  tree	 or a symlink to somewhere other than the Encap source
	      directory.

       EPT_CLN_ERROR
	      Failed to remove a link or directory while cleaning  the	target
	      directory	 due to a system or library call error.	 In this case,
	      errno is set to indicate the error.

       EPT_CLN_NOOP
	      Encountered a valid link while cleaning the Encap target.

       The fmt argument and all successive arguments are  identical  to	 those
       used by the printf() function.

       The  encap_close()  function  frees  all	 resources associated with the
       ENCAP handle.

RETURN VALUES
       The encap_open() function returns 0 on success, or -1 on	 failure  (and
       sets errno).

University of Illinois		   Oct 2002			 encap_open(3)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net