Re: [RFC][PATCH 1/5] uts namespaces: Implement utsname namespaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Sam Ravnborg ([email protected]):
> > diff --git a/include/linux/utsname.h b/include/linux/utsname.h
> > index 13e1da0..cc28ac5 100644
> > --- a/include/linux/utsname.h
> > +++ b/include/linux/utsname.h
> > @@ -1,5 +1,8 @@
> >  #ifndef _LINUX_UTSNAME_H
> >  #define _LINUX_UTSNAME_H
> You can kill this include
> > +#include <linux/sched.h>
> 
> if you move this static inline to sched.h
>  +
> > +static inline struct new_utsname *utsname(void)
> > +{
> > +	return &current->uts_ns->name;
> > +}
> And since it operates on &current that may make sense.

I had it there originally.  Don't mind moving it back if that
seems more appropriate, but of course then we'll need
to #include <linux/utsname.h> in sched.h, since we need to
know struct uts_ns to get uts_ns->name.

So is moving it to sched.h the way to go?

thanks,
-serge
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux