Skip to content

Commit

Permalink
[PATCH] uml: umid tidying
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Paolo 'Blaisorblade' Giarrusso <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
cfd-36 authored and Linus Torvalds committed Feb 11, 2007
1 parent 4cffb7f commit de5fe76
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 27 deletions.
1 change: 0 additions & 1 deletion arch/um/drivers/mconsole_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "irq_user.h"
#include "init.h"
#include "os.h"
#include "umid.h"
#include "irq_kern.h"
#include "choose-mode.h"

Expand Down
2 changes: 1 addition & 1 deletion arch/um/drivers/mconsole_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "user.h"
#include "sysdep/ptrace.h"
#include "mconsole.h"
#include "umid.h"
#include "os.h"
#include "user_util.h"

static struct mconsole_command commands[] = {
Expand Down
22 changes: 0 additions & 22 deletions arch/um/include/umid.h

This file was deleted.

1 change: 0 additions & 1 deletion arch/um/kernel/um_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#include "kern.h"
#include "mem_user.h"
#include "mem.h"
#include "umid.h"
#include "initrd.h"
#include "init.h"
#include "os.h"
Expand Down
4 changes: 3 additions & 1 deletion arch/um/kernel/umid.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ static int __init set_umid_arg(char *name, int *add)
{
int err;

if(umid_inited)
if(umid_inited){
printf("umid already set\n");
return 0;
}

*add = 0;
err = set_umid(name);
Expand Down
3 changes: 2 additions & 1 deletion arch/um/os-Linux/umid.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define UMID_LEN 64

/* Changed by set_umid, which is run early in boot */
char umid[UMID_LEN] = { 0 };
static char umid[UMID_LEN] = { 0 };

/* Changed by set_uml_dir and make_uml_dir, which are run early in boot */
static char *uml_dir = UML_DIR;
Expand Down Expand Up @@ -235,6 +235,7 @@ int __init set_umid(char *name)
return 0;
}

/* Changed in make_umid, which is called during early boot */
static int umid_setup = 0;

int __init make_umid(void)
Expand Down

0 comments on commit de5fe76

Please sign in to comment.