Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ getversion(2) — RISC iX 1.2

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

version(1)

GETVERSION(2)  —  UNIX Programmer’s Manual

NAME

getversion − gets kernel version information

SYNOPSIS

#include <sys/version.h>

#define VERSIONLEN 32
 struct version {
unsignedv_id   : 20,/∗ Object id for identifying program ∗/
v_iver : 12;/∗ Internal version number ∗/
charv_version[VERSIONLEN];/∗ Version string for humans ∗/
};
 cc = getversion(buffer, bufsize)
int cc;
struct version ∗buffer;
int nbytes;

DESCRIPTION

getversion returnes the kernel version structure to the given buffer, at most bufsize bytes are copied. The v_id and v_iver are the numbers used by the versioning system, v_id is 1, and v_iver is unique for all released kernels. The v_version array contains the string printed when the kernel boots. 

RETURN VALUE

If the call succeeds a value of 0 is returned.  If the call fails, then a value of −1 is returned and an error code is placed in the global location errno. 

ERRORS

getversion will fail if the following is true:

EFAULT The buffer points outside the allocated address space. 

SEE ALSO

version(1)

7th Edition  —  Revision 1.2 of 17/12/88

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026