[PATCH] uml: header formatting cleanups
Clean up whitespace and return syntax in os.h. Signed-off-by: Jeff Dike <jdike@addtoit.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
b076bb02ee
commit
329c6e4257
@@ -61,66 +61,66 @@ struct openflags {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define OPENFLAGS() ((struct openflags) { .r = 0, .w = 0, .s = 0, .c = 0, \
|
#define OPENFLAGS() ((struct openflags) { .r = 0, .w = 0, .s = 0, .c = 0, \
|
||||||
.t = 0, .a = 0, .e = 0, .cl = 0 })
|
.t = 0, .a = 0, .e = 0, .cl = 0 })
|
||||||
|
|
||||||
static inline struct openflags of_read(struct openflags flags)
|
static inline struct openflags of_read(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.r = 1;
|
flags.r = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_write(struct openflags flags)
|
static inline struct openflags of_write(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.w = 1;
|
flags.w = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_rdwr(struct openflags flags)
|
static inline struct openflags of_rdwr(struct openflags flags)
|
||||||
{
|
{
|
||||||
return(of_read(of_write(flags)));
|
return of_read(of_write(flags));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_set_rw(struct openflags flags, int r, int w)
|
static inline struct openflags of_set_rw(struct openflags flags, int r, int w)
|
||||||
{
|
{
|
||||||
flags.r = r;
|
flags.r = r;
|
||||||
flags.w = w;
|
flags.w = w;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_sync(struct openflags flags)
|
static inline struct openflags of_sync(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.s = 1;
|
flags.s = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_create(struct openflags flags)
|
static inline struct openflags of_create(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.c = 1;
|
flags.c = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_trunc(struct openflags flags)
|
static inline struct openflags of_trunc(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.t = 1;
|
flags.t = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_append(struct openflags flags)
|
static inline struct openflags of_append(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.a = 1;
|
flags.a = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_excl(struct openflags flags)
|
static inline struct openflags of_excl(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.e = 1;
|
flags.e = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct openflags of_cloexec(struct openflags flags)
|
static inline struct openflags of_cloexec(struct openflags flags)
|
||||||
{
|
{
|
||||||
flags.cl = 1;
|
flags.cl = 1;
|
||||||
return(flags);
|
return flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* file.c */
|
/* file.c */
|
||||||
|
Reference in New Issue
Block a user