Commit 94b1c3eb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] knfsd: Remove name_lookup.h that noone is using anymore.

From: NeilBrown <neilb@cse.unsw.edu.au>
parent 5b2b9a81
/*
* map between user/group name and id for a given 'client'
*/
struct name_ent {
char name[20];
};
static inline int name_get_user(int uid, struct name_ent **namep)
{
struct name_ent *n = kmalloc(sizeof(*n),GFP_KERNEL);
if (n) sprintf(n->name, "%d",uid);
*namep = n;
return n ? 0 : -ENOMEM;
}
static inline int name_get_group(int uid, struct name_ent **namep)
{
struct name_ent *n = kmalloc(sizeof(*n),GFP_KERNEL);
if (n) sprintf(n->name, "%d",uid);
*namep = n;
return n ? 0 : -ENOMEM;
}
static inline int name_get_uid(char *name, int name_len, int *uidp)
{
*uidp = simple_strtoul(name, NULL, 0);
return 0;
}
static inline int name_get_gid(char *name, int name_len, int *gidp)
{
*gidp = simple_strtoul(name, NULL, 0);
return 0;
}
static inline void name_put(struct name_ent *ent)
{
kfree(ent);
}
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