2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 12:14:01 +08:00
linux-next/arch/um/kernel/umid.c
Jeff Dike de5fe76e43 [PATCH] uml: umid tidying
Add an error message when two umids are put on the command line.

umid.h is kind of pointless since it only declares one thing, and that
is already declared in os.h.

Commented the lack of locking of some data in os-Linux/umid.h.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-11 10:51:24 -08:00

40 lines
735 B
C

/*
* Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
* Licensed under the GPL
*/
#include "asm/errno.h"
#include "init.h"
#include "os.h"
#include "kern.h"
#include "linux/kernel.h"
/* Changed by set_umid_arg */
static int umid_inited = 0;
static int __init set_umid_arg(char *name, int *add)
{
int err;
if(umid_inited){
printf("umid already set\n");
return 0;
}
*add = 0;
err = set_umid(name);
if(err == -EEXIST)
printf("umid '%s' already in use\n", name);
else if(!err)
umid_inited = 1;
return 0;
}
__uml_setup("umid=", set_umid_arg,
"umid=<name>\n"
" This is used to assign a unique identity to this UML machine and\n"
" is used for naming the pid file and management console socket.\n\n"
);