insmod.c 457 B

123456789101112131415161718
  1. /* vim: tabstop=4 shiftwidth=4 noexpandtab
  2. * This file is part of ToaruOS and is released under the terms
  3. * of the NCSA / University of Illinois License - see LICENSE.md
  4. * Copyright (C) 2016 K. Lange
  5. *
  6. * insmod - Load kernel module
  7. *
  8. */
  9. #include <stdio.h>
  10. #include <syscall.h>
  11. int main(int argc, char * argv[]) {
  12. if (argc < 2) {
  13. fprintf(stderr, "Usage: %s <modulepath>\n", argv[0]);
  14. return 1;
  15. }
  16. return syscall_system_function(8, &argv[1]);
  17. }