ibcs2_misc.c (11734) | ibcs2_misc.c (16322) |
---|---|
1/* 2 * Copyright (c) 1995 Steven Wallace 3 * Copyright (c) 1994, 1995 Scott Bartram 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This software was developed by the Computer Systems Engineering group 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and --- 31 unchanged lines hidden (view full) --- 40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 42 * SUCH DAMAGE. 43 * 44 * from: Header: sun_misc.c,v 1.16 93/04/07 02:46:27 torek Exp 45 * 46 * @(#)sun_misc.c 8.1 (Berkeley) 6/18/93 47 * | 1/* 2 * Copyright (c) 1995 Steven Wallace 3 * Copyright (c) 1994, 1995 Scott Bartram 4 * Copyright (c) 1992, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * This software was developed by the Computer Systems Engineering group 8 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and --- 31 unchanged lines hidden (view full) --- 40 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 41 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 42 * SUCH DAMAGE. 43 * 44 * from: Header: sun_misc.c,v 1.16 93/04/07 02:46:27 torek Exp 45 * 46 * @(#)sun_misc.c 8.1 (Berkeley) 6/18/93 47 * |
48 * $Id$ | 48 * $Id: ibcs2_misc.c,v 1.9 1995/10/23 19:46:51 swallace Exp $ |
49 */ 50 51/* 52 * IBCS2 compatibility module. 53 * 54 * IBCS2 system calls that are implemented differently in BSD are 55 * handled here. 56 */ --- 50 unchanged lines hidden (view full) --- 107 108 109int 110ibcs2_ulimit(p, uap, retval) 111 struct proc *p; 112 struct ibcs2_ulimit_args *uap; 113 int *retval; 114{ | 49 */ 50 51/* 52 * IBCS2 compatibility module. 53 * 54 * IBCS2 system calls that are implemented differently in BSD are 55 * handled here. 56 */ --- 50 unchanged lines hidden (view full) --- 107 108 109int 110ibcs2_ulimit(p, uap, retval) 111 struct proc *p; 112 struct ibcs2_ulimit_args *uap; 113 int *retval; 114{ |
115#ifdef notyet |
|
115 int error; 116 struct rlimit rl; 117 struct setrlimit_args { 118 int resource; 119 struct rlimit *rlp; 120 } sra; | 116 int error; 117 struct rlimit rl; 118 struct setrlimit_args { 119 int resource; 120 struct rlimit *rlp; 121 } sra; |
122#endif |
|
121#define IBCS2_GETFSIZE 1 122#define IBCS2_SETFSIZE 2 123#define IBCS2_GETPSIZE 3 124#define IBCS2_GETDTABLESIZE 4 125 126 switch (SCARG(uap, cmd)) { 127 case IBCS2_GETFSIZE: 128 *retval = p->p_rlimit[RLIMIT_FSIZE].rlim_cur; --- 433 unchanged lines hidden (view full) --- 562 563int 564ibcs2_getgroups(p, uap, retval) 565 struct proc *p; 566 struct ibcs2_getgroups_args *uap; 567 int *retval; 568{ 569 int error, i; | 123#define IBCS2_GETFSIZE 1 124#define IBCS2_SETFSIZE 2 125#define IBCS2_GETPSIZE 3 126#define IBCS2_GETDTABLESIZE 4 127 128 switch (SCARG(uap, cmd)) { 129 case IBCS2_GETFSIZE: 130 *retval = p->p_rlimit[RLIMIT_FSIZE].rlim_cur; --- 433 unchanged lines hidden (view full) --- 564 565int 566ibcs2_getgroups(p, uap, retval) 567 struct proc *p; 568 struct ibcs2_getgroups_args *uap; 569 int *retval; 570{ 571 int error, i; |
570 ibcs2_gid_t igid, *iset; | 572 ibcs2_gid_t *iset; |
571 struct getgroups_args sa; 572 gid_t *gp; 573 caddr_t sg = stackgap_init(); 574 575 SCARG(&sa, gidsetsize) = SCARG(uap, gidsetsize); 576 if (SCARG(uap, gidsetsize)) { 577 SCARG(&sa, gidset) = stackgap_alloc(&sg, NGROUPS_MAX * 578 sizeof(gid_t *)); --- 12 unchanged lines hidden (view full) --- 591 592int 593ibcs2_setgroups(p, uap, retval) 594 struct proc *p; 595 struct ibcs2_setgroups_args *uap; 596 int *retval; 597{ 598 int error, i; | 573 struct getgroups_args sa; 574 gid_t *gp; 575 caddr_t sg = stackgap_init(); 576 577 SCARG(&sa, gidsetsize) = SCARG(uap, gidsetsize); 578 if (SCARG(uap, gidsetsize)) { 579 SCARG(&sa, gidset) = stackgap_alloc(&sg, NGROUPS_MAX * 580 sizeof(gid_t *)); --- 12 unchanged lines hidden (view full) --- 593 594int 595ibcs2_setgroups(p, uap, retval) 596 struct proc *p; 597 struct ibcs2_setgroups_args *uap; 598 int *retval; 599{ 600 int error, i; |
599 ibcs2_gid_t igid, *iset; | 601 ibcs2_gid_t *iset; |
600 struct setgroups_args sa; 601 gid_t *gp; 602 caddr_t sg = stackgap_init(); 603 604 SCARG(&sa, gidsetsize) = SCARG(uap, gidsetsize); 605 SCARG(&sa, gidset) = stackgap_alloc(&sg, SCARG(&sa, gidsetsize) * 606 sizeof(gid_t *)); 607 iset = stackgap_alloc(&sg, SCARG(&sa, gidsetsize) * --- 274 unchanged lines hidden (view full) --- 882} 883 884int 885ibcs2_nice(p, uap, retval) 886 struct proc *p; 887 struct ibcs2_nice_args *uap; 888 int *retval; 889{ | 602 struct setgroups_args sa; 603 gid_t *gp; 604 caddr_t sg = stackgap_init(); 605 606 SCARG(&sa, gidsetsize) = SCARG(uap, gidsetsize); 607 SCARG(&sa, gidset) = stackgap_alloc(&sg, SCARG(&sa, gidsetsize) * 608 sizeof(gid_t *)); 609 iset = stackgap_alloc(&sg, SCARG(&sa, gidsetsize) * --- 274 unchanged lines hidden (view full) --- 884} 885 886int 887ibcs2_nice(p, uap, retval) 888 struct proc *p; 889 struct ibcs2_nice_args *uap; 890 int *retval; 891{ |
890 int error, cur_nice = p->p_nice; | 892 int error; |
891 struct setpriority_args sa; 892 893 SCARG(&sa, which) = PRIO_PROCESS; 894 SCARG(&sa, who) = 0; 895 SCARG(&sa, prio) = p->p_nice + SCARG(uap, incr); 896 if (error = setpriority(p, &sa, retval)) 897 return EPERM; 898 *retval = p->p_nice; --- 255 unchanged lines hidden --- | 893 struct setpriority_args sa; 894 895 SCARG(&sa, which) = PRIO_PROCESS; 896 SCARG(&sa, who) = 0; 897 SCARG(&sa, prio) = p->p_nice + SCARG(uap, incr); 898 if (error = setpriority(p, &sa, retval)) 899 return EPERM; 900 *retval = p->p_nice; --- 255 unchanged lines hidden --- |