Commit 834030bf authored by Jan Harkes's avatar Jan Harkes Committed by Linus Torvalds

[PATCH] coda: fix ifdefs for CONFIG_CODA_FS_OLD_API

Trivial fix to make the CODA_FS_OLD_API config option actually work as
expected.
Signed-off-by: default avatarJan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 52842ed7
...@@ -28,7 +28,7 @@ int coda_fake_statfs; ...@@ -28,7 +28,7 @@ int coda_fake_statfs;
char * coda_f2s(struct CodaFid *f) char * coda_f2s(struct CodaFid *f)
{ {
static char s[60]; static char s[60];
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
sprintf(s, "(%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2]); sprintf(s, "(%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2]);
#else #else
sprintf(s, "(%08x.%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2], f->opaque[3]); sprintf(s, "(%08x.%08x.%08x.%08x)", f->opaque[0], f->opaque[1], f->opaque[2], f->opaque[3]);
......
...@@ -405,7 +405,7 @@ static int __init init_coda(void) ...@@ -405,7 +405,7 @@ static int __init init_coda(void)
int status; int status;
int i; int i;
printk(KERN_INFO "Coda Kernel/Venus communications, " printk(KERN_INFO "Coda Kernel/Venus communications, "
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
"v5.3.20" "v5.3.20"
#else #else
"v6.0.0" "v6.0.0"
......
...@@ -55,7 +55,7 @@ static void *alloc_upcall(int opcode, int size) ...@@ -55,7 +55,7 @@ static void *alloc_upcall(int opcode, int size)
inp->ih.opcode = opcode; inp->ih.opcode = opcode;
inp->ih.pid = current->pid; inp->ih.pid = current->pid;
inp->ih.pgid = process_group(current); inp->ih.pgid = process_group(current);
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
memset(&inp->ih.cred, 0, sizeof(struct coda_cred)); memset(&inp->ih.cred, 0, sizeof(struct coda_cred));
inp->ih.cred.cr_fsuid = current->fsuid; inp->ih.cred.cr_fsuid = current->fsuid;
#else #else
...@@ -172,7 +172,7 @@ int venus_store(struct super_block *sb, struct CodaFid *fid, int flags, ...@@ -172,7 +172,7 @@ int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
int insize, outsize, error; int insize, outsize, error;
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
struct coda_cred cred = { 0, }; struct coda_cred cred = { 0, };
cred.cr_fsuid = uid; cred.cr_fsuid = uid;
#endif #endif
...@@ -180,7 +180,7 @@ int venus_store(struct super_block *sb, struct CodaFid *fid, int flags, ...@@ -180,7 +180,7 @@ int venus_store(struct super_block *sb, struct CodaFid *fid, int flags,
insize = SIZE(store); insize = SIZE(store);
UPARG(CODA_STORE); UPARG(CODA_STORE);
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
memcpy(&(inp->ih.cred), &cred, sizeof(cred)); memcpy(&(inp->ih.cred), &cred, sizeof(cred));
#else #else
inp->ih.uid = uid; inp->ih.uid = uid;
...@@ -219,7 +219,7 @@ int venus_close(struct super_block *sb, struct CodaFid *fid, int flags, ...@@ -219,7 +219,7 @@ int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
union inputArgs *inp; union inputArgs *inp;
union outputArgs *outp; union outputArgs *outp;
int insize, outsize, error; int insize, outsize, error;
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
struct coda_cred cred = { 0, }; struct coda_cred cred = { 0, };
cred.cr_fsuid = uid; cred.cr_fsuid = uid;
#endif #endif
...@@ -227,7 +227,7 @@ int venus_close(struct super_block *sb, struct CodaFid *fid, int flags, ...@@ -227,7 +227,7 @@ int venus_close(struct super_block *sb, struct CodaFid *fid, int flags,
insize = SIZE(release); insize = SIZE(release);
UPARG(CODA_CLOSE); UPARG(CODA_CLOSE);
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
memcpy(&(inp->ih.cred), &cred, sizeof(cred)); memcpy(&(inp->ih.cred), &cred, sizeof(cred));
#else #else
inp->ih.uid = uid; inp->ih.uid = uid;
......
...@@ -200,7 +200,7 @@ typedef u_int32_t vuid_t; ...@@ -200,7 +200,7 @@ typedef u_int32_t vuid_t;
typedef u_int32_t vgid_t; typedef u_int32_t vgid_t;
#endif /*_VUID_T_ */ #endif /*_VUID_T_ */
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
struct CodaFid { struct CodaFid {
u_int32_t opaque[3]; u_int32_t opaque[3];
}; };
...@@ -220,7 +220,7 @@ struct coda_cred { ...@@ -220,7 +220,7 @@ struct coda_cred {
vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */ vgid_t cr_groupid, cr_egid, cr_sgid, cr_fsgid; /* same for groups */
}; };
#else /* not defined(CODA_FS_OLD_API) */ #else /* not defined(CONFIG_CODA_FS_OLD_API) */
struct CodaFid { struct CodaFid {
u_int32_t opaque[4]; u_int32_t opaque[4];
...@@ -318,7 +318,7 @@ struct coda_statfs { ...@@ -318,7 +318,7 @@ struct coda_statfs {
#define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */ #define CODA_KERNEL_VERSION 0 /* don't care about kernel version number */
#define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */ #define CODA_KERNEL_VERSION 1 /* The old venus 4.6 compatible interface */
#endif #endif
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
#define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */ #define CODA_KERNEL_VERSION 2 /* venus_lookup got an extra parameter */
#else #else
#define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */ #define CODA_KERNEL_VERSION 3 /* 128-bit file identifiers */
...@@ -330,7 +330,7 @@ struct coda_statfs { ...@@ -330,7 +330,7 @@ struct coda_statfs {
struct coda_in_hdr { struct coda_in_hdr {
u_int32_t opcode; u_int32_t opcode;
u_int32_t unique; /* Keep multiple outstanding msgs distinct */ u_int32_t unique; /* Keep multiple outstanding msgs distinct */
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
u_int16_t pid; /* Common to all */ u_int16_t pid; /* Common to all */
u_int16_t pgid; /* Common to all */ u_int16_t pgid; /* Common to all */
u_int16_t sid; /* Common to all */ u_int16_t sid; /* Common to all */
...@@ -614,7 +614,7 @@ struct coda_vget_out { ...@@ -614,7 +614,7 @@ struct coda_vget_out {
/* CODA_PURGEUSER is a venus->kernel call */ /* CODA_PURGEUSER is a venus->kernel call */
struct coda_purgeuser_out { struct coda_purgeuser_out {
struct coda_out_hdr oh; struct coda_out_hdr oh;
#ifdef CODA_FS_OLD_API #ifdef CONFIG_CODA_FS_OLD_API
struct coda_cred cred; struct coda_cred cred;
#else #else
vuid_t uid; vuid_t uid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment