* Standard kernel module handling code for filesystem modules. * Referenced from VFS_SET(). */
| 568 | * Referenced from VFS_SET(). |
| 569 | */ |
| 570 | int |
| 571 | vfs_modevent(module_t mod, int type, void *data) |
| 572 | { |
| 573 | struct vfsconf *vfc; |
| 574 | int error = 0; |
| 575 | |
| 576 | vfc = (struct vfsconf *)data; |
| 577 | |
| 578 | switch (type) { |
| 579 | case MOD_LOAD: |
| 580 | if (vfc) |
| 581 | error = vfs_register(vfc); |
| 582 | break; |
| 583 | |
| 584 | case MOD_UNLOAD: |
| 585 | if (vfc) |
| 586 | error = vfs_unregister(vfc); |
| 587 | break; |
| 588 | default: |
| 589 | error = EOPNOTSUPP; |
| 590 | break; |
| 591 | } |
| 592 | return (error); |
| 593 | } |
no test coverage detected