]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/um/kernel/umid.c
um: Use os_warn to print out pre-boot warning/error messages
[mirror_ubuntu-bionic-kernel.git] / arch / um / kernel / umid.c
CommitLineData
c5d4bb17
JD
1/*
2 * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
1da177e4
LT
3 * Licensed under the GPL
4 */
5
c5d4bb17 6#include <asm/errno.h>
37185b33
AV
7#include <init.h>
8#include <kern.h>
9#include <os.h>
1da177e4 10
7eebe8a9 11/* Changed by set_umid_arg */
1da177e4
LT
12static int umid_inited = 0;
13
2264c475 14static int __init set_umid_arg(char *name, int *add)
1da177e4 15{
2264c475 16 int err;
1da177e4 17
c5d4bb17 18 if (umid_inited) {
0936d4f3 19 os_warn("umid already set\n");
2264c475 20 return 0;
de5fe76e 21 }
1da177e4 22
1da177e4 23 *add = 0;
7eebe8a9 24 err = set_umid(name);
c5d4bb17 25 if (err == -EEXIST)
0936d4f3 26 os_warn("umid '%s' already in use\n", name);
c5d4bb17 27 else if (!err)
2264c475
JD
28 umid_inited = 1;
29
30 return 0;
1da177e4
LT
31}
32
33__uml_setup("umid=", set_umid_arg,
34"umid=<name>\n"
35" This is used to assign a unique identity to this UML machine and\n"
36" is used for naming the pid file and management console socket.\n\n"
37);
38