umid.c 699 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
  3. * Licensed under the GPL
  4. */
  5. #include "asm/errno.h"
  6. #include "init.h"
  7. #include "os.h"
  8. #include "kern.h"
  9. #include "linux/kernel.h"
  10. /* Changed by set_umid_arg */
  11. static int umid_inited = 0;
  12. static int __init set_umid_arg(char *name, int *add)
  13. {
  14. int err;
  15. if(umid_inited)
  16. return 0;
  17. *add = 0;
  18. err = set_umid(name);
  19. if(err == -EEXIST)
  20. printf("umid '%s' already in use\n", name);
  21. else if(!err)
  22. umid_inited = 1;
  23. return 0;
  24. }
  25. __uml_setup("umid=", set_umid_arg,
  26. "umid=<name>\n"
  27. " This is used to assign a unique identity to this UML machine and\n"
  28. " is used for naming the pid file and management console socket.\n\n"
  29. );