Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54281
b: refs/heads/master
c: b4ffb6a
h: refs/heads/master
i:
  54279: ba90aad
v: v3
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 7, 2007
1 parent 69e2f4a commit 7deb91e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5ed1ffa6c2480cdcf3f0aa945f0b8622fe4e90b
refs/heads/master: b4ffb6ad8d8477b561377ca150bbbfc0db02da54
2 changes: 1 addition & 1 deletion trunk/arch/um/include/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ extern void stack_protections(unsigned long address);
extern void task_protections(unsigned long address);
extern int raw(int fd);
extern void setup_machinename(char *machine_out);
extern void setup_hostinfo(void);
extern void setup_hostinfo(char *buf, int len);
extern int setjmp_wrapper(void (*proc)(void *, void *), ...);

/* time.c */
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/um/include/user_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ extern unsigned long end_vm;
extern unsigned long start_vm;
extern unsigned long long highmem;

extern char host_info[];

extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end;
extern unsigned long _unprotected_end;
extern unsigned long brk_start;
Expand Down
6 changes: 5 additions & 1 deletion trunk/arch/um/kernel/um_arch.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "linux/seq_file.h"
#include "linux/delay.h"
#include "linux/module.h"
#include "linux/utsname.h"
#include "asm/page.h"
#include "asm/pgtable.h"
#include "asm/ptrace.h"
Expand Down Expand Up @@ -67,6 +68,9 @@ unsigned long thread_saved_pc(struct task_struct *task)
task));
}

/* Changed in setup_arch, which is called in early boot */
static char host_info[(__NEW_UTS_LEN + 1) * 5];

static int show_cpuinfo(struct seq_file *m, void *v)
{
int index = 0;
Expand Down Expand Up @@ -482,7 +486,7 @@ void __init setup_arch(char **cmdline_p)
paging_init();
strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
*cmdline_p = command_line;
setup_hostinfo();
setup_hostinfo(host_info, sizeof host_info);
}

void __init check_bugs(void)
Expand Down
8 changes: 3 additions & 5 deletions trunk/arch/um/os-Linux/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,13 @@ void setup_machinename(char *machine_out)
strcpy(machine_out, host.machine);
}

char host_info[(_UTSNAME_LENGTH + 1) * 4 + _UTSNAME_NODENAME_LENGTH + 1];

void setup_hostinfo(void)
void setup_hostinfo(char *buf, int len)
{
struct utsname host;

uname(&host);
sprintf(host_info, "%s %s %s %s %s", host.sysname, host.nodename,
host.release, host.version, host.machine);
snprintf(buf, len, "%s %s %s %s %s", host.sysname, host.nodename,
host.release, host.version, host.machine);
}

int setjmp_wrapper(void (*proc)(void *, void *), ...)
Expand Down

0 comments on commit 7deb91e

Please sign in to comment.