varsym_list man page on DragonFly

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

VARSYM(2)		    BSD System Calls Manual		     VARSYM(2)

NAME
     varsym_get, varsym_set, varsym_list — variant symlink variables

LIBRARY
     Standard C Library (libc, -lc)

SYNOPSIS
     #include <unistd.h>
     #include <sys/varsym.h>

     int
     varsym_get(int mask, const char *wild, char *buf, int bufsize);

     int
     varsym_set(int level, const char *name, const char *data);

     int
     varsym_list(int level, char *buf, int maxsize, int *marker);

DESCRIPTION
     The varsym_get() system call retrieves the value of the first variable
     whose left side matches wild and return the value in buf.	Bufsize speci‐
     fies the length of the buffer and mask can be used to further restrict
     the search to variables of certain type.  A value of VARSYM_ALL_MASK will
     search all variables (see below for other mask definitions).

     Varsym_set() sets the variable name of type level to the value pointed to
     by data.

     The varsym_list() system call fills the buffer buf with variable settings
     for the specified level.  A maximum of maxsize bytes of settings are
     returned and marker is set to the actual number of name/value pairs read,
     or -1 if no more remain.  Varsym_list() must be called repeatedly until
     marker is -1 if all settings are to be retrieved.	The format of the buf‐
     fer is “\000name\000value\000name\000value...”.

     The following varsym levels (and masks) are defined in <sys/varsym.h>:

     VARSYM_PROC (VARSYM_PROC_MASK)
	     Per-process variables.

     VARSYM_SYS (VARSYM_SYS_MASK)
	     System wide variables.

     VARSYM_PRISON
	     Used internally.

RETURN VALUES
     The varsym_get() and varsym_set() functions return the value 0 if suc‐
     cessful; otherwise the value -1 is returned and the global variable errno
     is set to indicate the error.

     The varsym_list() function returns the number of bytes read if success‐
     ful; otherwise the value -1 is returned and the global variable errno is
     set to indicate the error.

ERRORS
     The varsym system calls will fail when one of the following occurs:

     [EINVAL]		An invalid level was specified.

     [ENOENT]		A variable could not be found.

     [EOVERFLOW]	Insufficient space for storing variable values was
			specified.

SEE ALSO
     varsym(1)

HISTORY
     The varsym system calls first appeared in DragonFly 1.0.

AUTHORS
     The varsym system calls were written by Matthew Dillon and this manual
     page was written by Sascha Wildner.

BSD			       February 21, 2008			   BSD
[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