00001
00002
00003
00004
00005
00006 #include<linux/linkage.h>
00007
00008 #include<syidef.h>
00009 #include<ssdef.h>
00010 #include<misc.h>
00011 #include<pridef.h>
00012 #include<sbdef.h>
00013 #include<starlet.h>
00014 #include <exe_routines.h>
00015 #include <sch_routines.h>
00016
00017 #include<linux/sched.h>
00018
00019 #include<linux/version.h>
00020
00021 extern struct _sb mysb;
00022
00023 asmlinkage int exe_getsyi(unsigned int efn, unsigned int *csidadr, void *nodename, void *itmlst, struct _iosb *iosb, void (*astadr)(), unsigned long astprm) {
00024 int sts;
00025 struct item_list_3 * it=itmlst;
00026
00027 if (iosb) {
00028
00029 memset(iosb,0,sizeof(struct _iosb));
00030 }
00031 exe_clref(efn);
00032
00033
00034
00035 while (it->item_code) {
00036 switch (it->item_code) {
00037 case SYI__VERSION:
00038 memcpy(it->bufaddr, FREEVMS_RELEASE, strlen(FREEVMS_RELEASE));
00039 break;
00040
00041 case SYI__SCSNODE:
00042 memcpy(it->bufaddr,&mysb.sb_t_nodename,15);
00043 break;
00044
00045 case SYI__BOOTTIME:
00046 memcpy(it->bufaddr,&exe_gq_boottime,8);
00047 break;
00048
00049 case SYI__MAXBUF:
00050 memcpy(it->bufaddr,&ioc_gw_maxbuf,sizeof(long));
00051 break;
00052
00053 case SYI__LASTFLD:
00054 {
00055 #ifdef CONFIG_VMS
00056 int mem=1;
00057 #else
00058 int mem=0;
00059 #endif
00060 memcpy(it->bufaddr,&mem,4);
00061 }
00062 break;
00063
00064 default:
00065 printk("unrecognized syi\n");
00066 break;
00067 }
00068 it++;
00069 }
00070
00071 struct _pcb * pcb = ctl_gl_pcb;
00072 sch_postef(pcb->pcb$l_pid, PRI$_NULL, efn);
00073
00074 if (iosb)
00075 iosb->iosb_w_status=SS$_NORMAL;
00076
00077 return SS__NORMAL;
00078 }
00079
00080 asmlinkage int exe_getsyiw(unsigned int efn, unsigned int *csidadr, void *nodename, void *itmlst, struct _iosb *iosb, void (*astadr)(), unsigned long astprm) {
00081 int status=exe_getsyi(efn,csidadr,nodename,itmlst,iosb,astadr,astprm);
00082 if ((status&1)==0) return status;
00083 return exe_synch(efn,iosb);
00084 }
00085
00086 asmlinkage int exe_getsyiw_wrap(struct struct_args * s) {
00087 return exe_getsyiw(s->s1,s->s2,s->s3,s->s4,s->s5,s->s6,s->s7);
00088 }
00089
00090
00091 asmlinkage int exe_getsyi_wrap(struct struct_args * s) {
00092 return exe_getsyi(s->s1,s->s2,s->s3,s->s4,s->s5,s->s6,s->s7);
00093 }
00094