~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to include/linux/utsname.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
#include <linux/nsproxy.h>
38
38
#include <linux/err.h>
39
39
 
 
40
struct user_namespace;
 
41
extern struct user_namespace init_user_ns;
 
42
 
40
43
struct uts_namespace {
41
44
        struct kref kref;
42
45
        struct new_utsname name;
 
46
        struct user_namespace *user_ns;
43
47
};
44
48
extern struct uts_namespace init_uts_ns;
45
49
 
50
54
}
51
55
 
52
56
extern struct uts_namespace *copy_utsname(unsigned long flags,
53
 
                                        struct uts_namespace *ns);
 
57
                                          struct task_struct *tsk);
54
58
extern void free_uts_ns(struct kref *kref);
55
59
 
56
60
static inline void put_uts_ns(struct uts_namespace *ns)
67
71
}
68
72
 
69
73
static inline struct uts_namespace *copy_utsname(unsigned long flags,
70
 
                                        struct uts_namespace *ns)
 
74
                                                 struct task_struct *tsk)
71
75
{
72
76
        if (flags & CLONE_NEWUTS)
73
77
                return ERR_PTR(-EINVAL);
74
78
 
75
 
        return ns;
 
79
        return tsk->nsproxy->uts_ns;
76
80
}
77
81
#endif
78
82