Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/QNX4/driver/version.c

Go to the documentation of this file.
00001 
00002 #include <sys/sys_msg.h>
00003 #include <errno.h>
00004 
00005 #include <string.h>
00006 
00007 int sys_msg(void *buf) {
00008    union _sysmsg {
00009       int status;
00010       struct _ver {
00011          struct _sysmsg_hdr hdr;
00012          struct _sysmsg_version version;
00013          } ver;
00014       struct _ver_reply {
00015          struct _sysmsg_hdr_reply hdr;
00016          struct _sysmsg_version_reply version;
00017          } ver_reply;
00018       } *m;
00019 
00020    m = buf;
00021 
00022    switch(m->ver.hdr.subtype) {
00023 
00024    case _SYSMSG_SUBTYPE_VERSION:
00025       memset(&m->ver_reply, 0, sizeof(m->ver_reply));
00026       m->ver_reply.hdr.status = 0;
00027       strcpy(&m->ver_reply.version.name[0], NAME);
00028       strncpy(&m->ver_reply.version.date[0], __DATE__, 11);
00029       m->ver_reply.version.version = VERSION;
00030       m->ver_reply.version.letter = RELEASE[0];
00031       return(sizeof(m->ver_reply));
00032 
00033    case _SYSMSG_SUBTYPE_DEATH:
00034    case _SYSMSG_SUBTYPE_TRACE:
00035    default:
00036       m->status = EINVAL;
00037       return(sizeof(m->status));
00038       }
00039    }

Generated on Sun Oct 14 18:46:41 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001