blob: 039e16efcd5571a7a520f051cf5efa1c61c61b54 [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 Dike2264c4752006-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 Dike2264c4752006-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 Dike2264c4752006-01-06 00:18:59 -080017 int err;
18
Jeff Dikede5fe762007-02-10 01:44:25 -080019 if(umid_inited){
20 printf("umid already set\n");
Jeff Dike2264c4752006-01-06 00:18:59 -080021 return 0;
Jeff Dikede5fe762007-02-10 01:44:25 -080022 }
Jeff Dike2264c4752006-01-06 00:18:59 -080023
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 *add = 0;
Jeff Dike7eebe8a2006-01-06 00:19:01 -080025 err = set_umid(name);
26 if(err == -EEXIST)
Jeff Dike2264c4752006-01-06 00:18:59 -080027 printf("umid '%s' already in use\n", name);
Jeff Dike2264c4752006-01-06 00:18:59 -080028 else if(!err)
29 umid_inited = 1;
30
31 return 0;
Linus Torvalds1da177e2005-04-16 15:20:36 -070032}
33
34__uml_setup("umid=", set_umid_arg,
35"umid=<name>\n"
36" This is used to assign a unique identity to this UML machine and\n"
37" is used for naming the pid file and management console socket.\n\n"
38);
39