 |
Index for Section 3 |
|
 |
Alphabetical listing for V |
|
 |
Bottom of page |
|
versw(3)
NAME
versw, VERSW - Check the status of an operating system version switch on a
single cluster member to determine whether the calling application can
enable new features that are incompatible with the old version of the
operating system
SYNOPSIS
#include <sys/versw.h>
#include <sys/clu.h>
int VERSW(
);
int versw(
ulong high_vers,
ulong low_vers );
LIBRARY
Standard C Library (libc)
PARAMETERS
high_vers
Most significant ulong of new version ID.
low_vers
Least significant ulong of new version ID.
DESCRIPTION
The VERSW() macro and versw() function check the status of a version switch
on a single cluster member to determine whether the calling application can
enable new features that are incompatible with the old version of the
operating system. Applications can use the VERSW() macro to enable new
features on cluster members participating in a rolling upgrade.
The versw() function examines the versw_transition attribute of the generic
subsystem of the member's /etc/sysconfigtab file and compares the specified
high_vers and low_vers parameters to the new version of the running kernel.
It then compares these parameters to the active version of the running
kernel. The VERSW() macro provides a wrapper for the versw() function.
Because the VERSW() macro automatically extracts the high and low version
values from /usr/sys/conf/version.id, we recommend that you use it rather
than call the versw() function directly.
RETURN VALUES
Upon completion, the VERSW() macro and versw() function return one of the
following values:
VERSW_DISABLE
A version switch is in progress and the specified new version is
greater than the active version of the running kernel. The calling
application should disable new, incompatible features and respond to
all requests for such features with an error condition.
VERSW_ENABLE
A version switch is in progess and the specified new version is less
than or equal to new version of the running kernel, or a version switch
is not in progress and the specified new version is less than or equal
to the active version of the running kernel. The application can
safely enable, and entertain requests for, all new features.
VERSW_TRANSITION
A version switch is in progress and the specified new version is
greater than the active version of the running kernel. The application
should disable new, incompatible features. Although the application
should respond to all requests for such features originating on the
local member with an error condition, it should be prepared to handle
requests for new, incompatible features originating from other cluster
members with grace and elan.
EXAMPLES
#include <stdio.h>
#include <sys/versw.h>
#include <sys/clu.h>
main() {
if(VERSW() == VERSW_ENABLE)
printf("Enable new features\n");
else printf("Disable new features\n");
endif
}
FILES
/var/adm/versw
Rolling upgrade blocking conditions directory.
sys/versw.h
Version switch header file.
/usr/sys/conf/version.id
High and low version values used by VERSW() macro.
SEE ALSO
Functions: clu_is_member(3), clu_get_info(3)
Commands: versw(8)
 |
Index for Section 3 |
|
 |
Alphabetical listing for V |
|
 |
Top of page |
|