From fb96e13d6f93fd7f7d833b4c66753b63a50c9003 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Tue, 28 Jul 2009 12:13:10 +0100 Subject: [PATCH] Cleanup for the USS directory Add additional header files for prototypes Add additional prototypes to header files yyerror() is internal, not external. Make it static while we're at it. ANSIfy various function definitions Unsigned vs signed cleanup Reviewed-on: http://gerrit.openafs.org/239 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear --- src/uss/grammar.y | 9 ++++++--- src/uss/lex.l | 7 +++---- src/uss/uss_fs.c | 2 +- src/uss/uss_kauth.h | 4 ++++ src/uss/uss_procs.h | 17 +++++++++++++++++ 5 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/uss/grammar.y b/src/uss/grammar.y index 7abb30c..c943c6b 100644 --- a/src/uss/grammar.y +++ b/src/uss/grammar.y @@ -12,12 +12,15 @@ #include #include #include +#include "uss_procs.h" +#include "uss_vol.h" +#include "uss_kauth.h" extern int line; extern int uss_perr; extern int yylex(void); -extern int yyerror(char *); +static int yyerror(char *); %} @@ -127,8 +130,8 @@ accesslist : /* empty */ ; %% -yyerror(s) -char *s; +static int +yyerror(char *s) { fprintf(stderr,"%s. ",s); return 0; diff --git a/src/uss/lex.l b/src/uss/lex.l index 976211f..503da07 100644 --- a/src/uss/lex.l +++ b/src/uss/lex.l @@ -15,6 +15,7 @@ #include "y.tab.h" #include "uss_common.h" +#include "uss_procs.h" int line=1; #ifdef DEBUG #define dprint(x) {fprintf(stderr, x); fflush(stderr);} @@ -69,9 +70,7 @@ EOL [\n] */ void -Replace(in, out) - char *in, *out; - +Replace(char *in, char *out) { /*Replace*/ char *in_text, *in_var, *out_cp, VarNo; @@ -196,7 +195,7 @@ Replace(in, out) } /*Replace*/ -yywrap() +int yywrap(void) { return(1); } diff --git a/src/uss/uss_fs.c b/src/uss/uss_fs.c index 82b117d..d3743a1 100644 --- a/src/uss/uss_fs.c +++ b/src/uss/uss_fs.c @@ -555,7 +555,7 @@ struct tokenInfo { int uss_fs_UnlogToken(char *celln) { - unsigned int count = 0, index, index2; + int count = 0, index, index2; afs_int32 code = 0, cnt = 0; struct ktc_principal serviceName; struct tokenInfo *tokenInfoP, *tp; diff --git a/src/uss/uss_kauth.h b/src/uss/uss_kauth.h index efc7968..e6e660a 100644 --- a/src/uss/uss_kauth.h +++ b/src/uss/uss_kauth.h @@ -83,4 +83,8 @@ extern afs_int32 uss_kauth_CheckUserName(void); * 1 if the user name is not legal. */ +extern afs_int32 uss_kauth_SetFields(char *username, char *expirestring, + char *reuse, char *failures, + char *lockout); + #endif /* _USS_KAUTH_H_ */ diff --git a/src/uss/uss_procs.h b/src/uss/uss_procs.h index 091a075..82ca78f 100644 --- a/src/uss/uss_procs.h +++ b/src/uss/uss_procs.h @@ -169,4 +169,21 @@ extern int uss_procs_GetOwner(char *a_ownerStr); * Owner's uid. */ +extern afs_int32 uss_procs_PickADir(char *path, char *cp); + /* + * Summary: + * Tries to replace $AUTO by a subdir. Subdirs are given by means + * of "G" in the configuration file. Each of the directories is + * examined, and the one with the inimum number of entries is + * picked. + * + * Args: + * a_path : ??? + * a_cp : ??? + * + * Returns: + * 0 if everything went well, + * -1 if there was a problem. + */ + #endif /* _USS_PROCS_H_ */ -- 1.9.4