blob: 4eaee823bfd2a4979a32295f2bba60c6f9e41ccb [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
Jeff Dike2264c472006-01-06 00:18:59 -08006#include "asm/errno.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -07007#include "init.h"
8#include "os.h"
Jeff Dike2264c472006-01-06 00:18:59 -08009#include "kern.h"
Jeff Dike7eebe8a2006-01-06 00:19:01 -080010#include "linux/kernel.h"
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Jeff Dike7eebe8a2006-01-06 00:19:01 -080012/* Changed by set_umid_arg */
Linus Torvalds1da177e2005-04-16 15:20:36 -070013static int umid_inited = 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15static int __init set_umid_arg(char *name, int *add)
16{
Jeff Dike2264c472006-01-06 00:18:59 -080017 int err;
18
19 if(umid_inited)
20 return 0;
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022 *add = 0;
Jeff Dike7eebe8a2006-01-06 00:19:01 -080023 err = set_umid(name);
24 if(err == -EEXIST)
Jeff Dike2264c472006-01-06 00:18:59 -080025 printf("umid '%s' already in use\n", name);
Jeff Dike2264c472006-01-06 00:18:59 -080026 else if(!err)
27 umid_inited = 1;
28
29 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070030}
31
32__uml_setup("umid=", set_umid_arg,
33"umid=<name>\n"
34" This is used to assign a unique identity to this UML machine and\n"
35" is used for naming the pid file and management console socket.\n\n"
36);
37