Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84603
b: refs/heads/master
c: 58bfdd6
h: refs/heads/master
i:
  84601: 505e232
  84599: 4b21bf8
v: v3
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Feb 8, 2008
1 parent ccc850e commit 0053797
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 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: c5289a69491f2b597e22d0456b46cc043deedbd8
refs/heads/master: 58bfdd6deeec02b73691ea2c951a3c5d743bca63
21 changes: 21 additions & 0 deletions trunk/include/linux/utsname.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ struct new_utsname {
#include <linux/sched.h>
#include <linux/kref.h>
#include <linux/nsproxy.h>
#include <linux/err.h>
#include <asm/atomic.h>

struct uts_namespace {
Expand All @@ -43,6 +44,7 @@ struct uts_namespace {
};
extern struct uts_namespace init_uts_ns;

#ifdef CONFIG_UTS_NS
static inline void get_uts_ns(struct uts_namespace *ns)
{
kref_get(&ns->kref);
Expand All @@ -56,6 +58,25 @@ static inline void put_uts_ns(struct uts_namespace *ns)
{
kref_put(&ns->kref, free_uts_ns);
}
#else
static inline void get_uts_ns(struct uts_namespace *ns)
{
}

static inline void put_uts_ns(struct uts_namespace *ns)
{
}

static inline struct uts_namespace *copy_utsname(unsigned long flags,
struct uts_namespace *ns)
{
if (flags & CLONE_NEWUTS)
return ERR_PTR(-EINVAL);

return ns;
}
#endif

static inline struct new_utsname *utsname(void)
{
return &current->nsproxy->uts_ns->name;
Expand Down
7 changes: 7 additions & 0 deletions trunk/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ config NAMESPACES
or same user id or pid may refer to different tasks when used in
different namespaces.

config UTS_NS
bool "UTS namespace"
depends on NAMESPACES
help
In this namespace tasks see different info provided with the
uname() system call

config BLK_DEV_INITRD
bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
depends on BROKEN || !FRV
Expand Down
3 changes: 2 additions & 1 deletion trunk/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ obj-y = sched.o fork.o exec_domain.o panic.o printk.o profile.o \
rcupdate.o extable.o params.o posix-timers.o \
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
hrtimer.o rwsem.o nsproxy.o srcu.o \
utsname.o notifier.o ksysfs.o pm_qos_params.o
notifier.o ksysfs.o pm_qos_params.o

obj-$(CONFIG_SYSCTL) += sysctl_check.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
Expand All @@ -33,6 +33,7 @@ obj-$(CONFIG_PROVE_LOCKING) += spinlock.o
obj-$(CONFIG_UID16) += uid16.o
obj-$(CONFIG_MODULES) += module.o
obj-$(CONFIG_KALLSYMS) += kallsyms.o
obj-$(CONFIG_UTS_NS) += utsname.o
obj-$(CONFIG_PM) += power/
obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o
obj-$(CONFIG_KEXEC) += kexec.o
Expand Down

0 comments on commit 0053797

Please sign in to comment.