X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=fs%2Fgfs2%2Feaops.c;h=92c54e9b0dc3b8592cec55b33c0ba61d185ac37f;hb=f1877fb2967ec8c0c6e946cc24c253bb52ce4d06;hp=3ace242f2b1684ab059d4a9afb4a2a7239056451;hpb=4bf311ddfbffe12d41ad1a3c311ab727db6f72cb;p=powerpc.git diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 3ace242f2b..92c54e9b0d 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c @@ -4,7 +4,7 @@ * * This copyrighted material is made available to anyone wishing to use, * modify, copy, or redistribute it subject to the terms and conditions - * of the GNU General Public License v.2. + * of the GNU General Public License version 2. */ #include @@ -14,10 +14,10 @@ #include #include #include +#include #include #include "gfs2.h" -#include "lm_interface.h" #include "incore.h" #include "acl.h" #include "eaops.h" @@ -31,22 +31,22 @@ * Returns: GFS2_EATYPE_XXX */ -unsigned int gfs2_ea_name2type(const char *name, char **truncated_name) +unsigned int gfs2_ea_name2type(const char *name, const char **truncated_name) { unsigned int type; if (strncmp(name, "system.", 7) == 0) { type = GFS2_EATYPE_SYS; if (truncated_name) - *truncated_name = strchr(name, '.') + 1; + *truncated_name = name + sizeof("system.") - 1; } else if (strncmp(name, "user.", 5) == 0) { type = GFS2_EATYPE_USR; if (truncated_name) - *truncated_name = strchr(name, '.') + 1; + *truncated_name = name + sizeof("user.") - 1; } else if (strncmp(name, "security.", 9) == 0) { type = GFS2_EATYPE_SECURITY; if (truncated_name) - *truncated_name = strchr(name, '.') + 1; + *truncated_name = name + sizeof("security.") - 1; } else { type = GFS2_EATYPE_UNUSED; if (truncated_name) @@ -146,7 +146,7 @@ static int system_eo_set(struct gfs2_inode *ip, struct gfs2_ea_request *er) if (error == -ENODATA) error = 0; } - return error; + return error; } return -EPERM;