Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (C) 2001 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
0004  */
0005 
0006 #include <asm/errno.h>
0007 #include <init.h>
0008 #include <kern.h>
0009 #include <os.h>
0010 
0011 /* Changed by set_umid_arg */
0012 static int umid_inited = 0;
0013 
0014 static int __init set_umid_arg(char *name, int *add)
0015 {
0016     int err;
0017 
0018     if (umid_inited) {
0019         os_warn("umid already set\n");
0020         return 0;
0021     }
0022 
0023     *add = 0;
0024     err = set_umid(name);
0025     if (err == -EEXIST)
0026         os_warn("umid '%s' already in use\n", name);
0027     else if (!err)
0028         umid_inited = 1;
0029 
0030     return 0;
0031 }
0032 
0033 __uml_setup("umid=", set_umid_arg,
0034 "umid=<name>\n"
0035 "    This is used to assign a unique identity to this UML machine and\n"
0036 "    is used for naming the pid file and management console socket.\n\n"
0037 );
0038