.\" This manpage has been automatically generated by docbook2man
.\" from a DocBook document. This tool can be found at:
.\"
.\" Please send any bug reports, improvements, comments, patches,
.\" etc. to Steve Cheng .
.TH "ADD_HOTPLUG_ENV_VAR" "9" "09 October 2005" "" ""
.SH NAME
add_hotplug_env_var \- helper for creating hotplug environment variables
.SH SYNOPSIS
"SYNOPSIS"
.sp
\fB
.sp
int add_hotplug_env_var (char ** \fIenvp\fB, int \fInum_envp\fB, int * \fIcur_index\fB, char * \fIbuffer\fB, int \fIbuffer_size\fB, int * \fIcur_len\fB, const char * \fIformat\fB, \fI\&...\fB);
\fR
.SH "ARGUMENTS"
.TP
\fB\fIenvp\fB\fR
Pointer to table of environment variables, as passed into
\fBhotplug\fR method.
.TP
\fB\fInum_envp\fB\fR
Number of environment variable slots available, as
passed into \fBhotplug\fR method.
.TP
\fB\fIcur_index\fB\fR
Pointer to current index into \fIenvp\fR\&. It should be
initialized to 0 before the first call to \fBadd_hotplug_env_var\fR,
and will be incremented on success.
.TP
\fB\fIbuffer\fB\fR
Pointer to buffer for environment variables, as passed
into \fBhotplug\fR method.
.TP
\fB\fIbuffer_size\fB\fR
Length of \fIbuffer\fR, as passed into \fBhotplug\fR method.
.TP
\fB\fIcur_len\fB\fR
Pointer to current length of space used in \fIbuffer\fR\&.
Should be initialized to 0 before the first call to
\fBadd_hotplug_env_var\fR, and will be incremented on success.
.TP
\fB\fIformat\fB\fR
Format for creating environment variable (of the form
``XXX=x'') for \fBsnprintf\fR\&.
.TP
\fB\fI\&...\fB\fR
variable arguments
.SH "DESCRIPTION"
.PP
Returns 0 if environment variable was added successfully or -ENOMEM
if no space was available.