Print this page
use NULL capable segop as a shorthand for no-capabilities
Instead of forcing every segment driver to implement a dummy "return 0"
function, handle NULL capable segop function pointer as "no copabilities
supported" shorthand.

*** 104,120 **** size_t len, enum fault_type type, enum seg_rw rw); static void segkpm_dump(struct seg *); static int segkpm_pagelock(struct seg *seg, caddr_t addr, size_t len, struct page ***page, enum lock_type type, enum seg_rw rw); - static int segkpm_capable(struct seg *, segcapability_t); static struct seg_ops segkpm_ops = { .fault = segkpm_fault, .dump = segkpm_dump, .pagelock = segkpm_pagelock, - .capable = segkpm_capable, //#ifndef SEGKPM_SUPPORT #if 0 #error FIXME: define nop .dup = nop, .unmap = nop, --- 104,118 ----
*** 329,343 **** /*ARGSUSED*/ static void segkpm_dump(struct seg *seg) { } - - /* - * We claim to have no special capabilities. - */ - /*ARGSUSED*/ - static int - segkpm_capable(struct seg *seg, segcapability_t capability) - { - return (0); - } --- 327,331 ----