Print this page
const-ify make segment ops structures
There is no reason to keep the segment ops structures writable.
*** 756,766 ****
if (capability == S_CAPABILITY_NOMINFLT)
return (1);
return (0);
}
! static struct seg_ops segkmem_ops = {
.fault = segkmem_fault,
.setprot = segkmem_setprot,
.checkprot = segkmem_checkprot,
.kluster = segkmem_kluster,
.dump = segkmem_dump,
--- 756,766 ----
if (capability == S_CAPABILITY_NOMINFLT)
return (1);
return (0);
}
! static const struct seg_ops segkmem_ops = {
.fault = segkmem_fault,
.setprot = segkmem_setprot,
.checkprot = segkmem_checkprot,
.kluster = segkmem_kluster,
.dump = segkmem_dump,