KERNEL, (vir_bytes) &io_range, sizeof(io_range));
priv(rp)->s_flags |= CHECK_IO_PORT; /* Check I/O accesses */
i= priv(rp)->s_nr_io_range;
- if (i >= NR_IO_RANGE)
+ if (i >= NR_IO_RANGE) {
+ printf("do_privctl: %d already has %d i/o ranges.\n",
+ rp->p_endpoint, i);
return ENOMEM;
+ }
priv(rp)->s_io_tab[i].ior_base= io_range.ior_base;
priv(rp)->s_io_tab[i].ior_limit= io_range.ior_limit;
return r;
priv(rp)->s_flags |= CHECK_MEM; /* Check memory mappings */
i= priv(rp)->s_nr_mem_range;
- if (i >= NR_MEM_RANGE)
+ if (i >= NR_MEM_RANGE) {
+ printf("do_privctl: %d already has %d mem ranges.\n",
+ rp->p_endpoint, i);
return ENOMEM;
+ }
priv(rp)->s_mem_tab[i].mr_base= mem_range.mr_base;
priv(rp)->s_mem_tab[i].mr_limit= mem_range.mr_limit;
priv(rp)->s_flags |= CHECK_IRQ; /* Check IRQs */
i= priv(rp)->s_nr_irq;
- if (i >= NR_IRQ)
+ if (i >= NR_IRQ) {
+ printf("do_privctl: %d already has %d irq's.\n",
+ rp->p_endpoint, i);
return ENOMEM;
+ }
priv(rp)->s_irq_tab[i]= irq;
priv(rp)->s_nr_irq++;