Print this page
sysinfo emulation


 891 
 892 int
 893 _init(void)
 894 {
 895         int err;
 896 
 897         /*
 898          * Set up the table indicating which system calls we want to
 899          * interpose on.  We should probably build this automatically from
 900          * a list of system calls that is shared with the user-space
 901          * library.
 902          */
 903         s10_emulation_table = kmem_zalloc(NSYSCALL, KM_SLEEP);
 904         s10_emulation_table[SYS_exec] = 1;                      /*  11 */
 905         s10_emulation_table[SYS_ioctl] = 1;                     /*  54 */
 906         s10_emulation_table[SYS_execve] = 1;                    /*  59 */
 907         s10_emulation_table[SYS_acctctl] = 1;                   /*  71 */
 908         s10_emulation_table[SYS_getpagesizes] = 1;              /*  73 */
 909         s10_emulation_table[S10_SYS_issetugid] = 1;             /*  75 */
 910         s10_emulation_table[SYS_uname] = 1;                     /* 135 */

 911         s10_emulation_table[SYS_pwrite] = 1;                    /* 174 */
 912         s10_emulation_table[SYS_sigqueue] = 1;                  /* 190 */
 913         s10_emulation_table[SYS_pwrite64] = 1;                  /* 223 */
 914         s10_emulation_table[SYS_zone] = 1;                      /* 227 */
 915 
 916         err = mod_install(&modlinkage);
 917         if (err) {
 918                 cmn_err(CE_WARN, "Couldn't install brand module");
 919                 kmem_free(s10_emulation_table, NSYSCALL);
 920         }
 921 
 922         return (err);
 923 }
 924 
 925 int
 926 _info(struct modinfo *modinfop)
 927 {
 928         return (mod_info(&modlinkage, modinfop));
 929 }
 930 




 891 
 892 int
 893 _init(void)
 894 {
 895         int err;
 896 
 897         /*
 898          * Set up the table indicating which system calls we want to
 899          * interpose on.  We should probably build this automatically from
 900          * a list of system calls that is shared with the user-space
 901          * library.
 902          */
 903         s10_emulation_table = kmem_zalloc(NSYSCALL, KM_SLEEP);
 904         s10_emulation_table[SYS_exec] = 1;                      /*  11 */
 905         s10_emulation_table[SYS_ioctl] = 1;                     /*  54 */
 906         s10_emulation_table[SYS_execve] = 1;                    /*  59 */
 907         s10_emulation_table[SYS_acctctl] = 1;                   /*  71 */
 908         s10_emulation_table[SYS_getpagesizes] = 1;              /*  73 */
 909         s10_emulation_table[S10_SYS_issetugid] = 1;             /*  75 */
 910         s10_emulation_table[SYS_uname] = 1;                     /* 135 */
 911         s10_emulation_table[SYS_systeminfo] = 1;                /* 139 */
 912         s10_emulation_table[SYS_pwrite] = 1;                    /* 174 */
 913         s10_emulation_table[SYS_sigqueue] = 1;                  /* 190 */
 914         s10_emulation_table[SYS_pwrite64] = 1;                  /* 223 */
 915         s10_emulation_table[SYS_zone] = 1;                      /* 227 */
 916 
 917         err = mod_install(&modlinkage);
 918         if (err) {
 919                 cmn_err(CE_WARN, "Couldn't install brand module");
 920                 kmem_free(s10_emulation_table, NSYSCALL);
 921         }
 922 
 923         return (err);
 924 }
 925 
 926 int
 927 _info(struct modinfo *modinfop)
 928 {
 929         return (mod_info(&modlinkage, modinfop));
 930 }
 931