[Sysfence-commit] sysfence datastruct.c,1.4,1.5 datastruct.h,1.3,1.4 getstats.c,1.14,1.15
Status: Alpha
Brought to you by:
emes
|
From: Michal S. <em...@us...> - 2004-05-29 17:30:10
|
Update of /cvsroot/sysfence/sysfence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6052 Modified Files: datastruct.c datastruct.h getstats.c Log Message: * consistient names, no plurals Index: datastruct.h =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- datastruct.h 28 May 2004 23:26:20 -0000 1.3 +++ datastruct.h 29 May 2004 17:29:28 -0000 1.4 @@ -167,7 +167,7 @@ // Statistics of underlying filesystem in path char *path; long int val[ VA_LAST ]; -} sf_fs_stats; +} sf_fs_stat; typedef struct { // Main statistics database @@ -186,7 +186,7 @@ int equal_defs (sf_stat_def *d1, sf_stat_def *d2); int uid_in_list (sf_list *hd, uid_t uid); void add_fs_entry_to_list (sf_list **hd, char *path); -sf_fs_stats * get_fs_entry_from_list (sf_list *hd, char *path); +sf_fs_stat * get_fs_entry_from_list (sf_list *hd, char *path); char * def_2_string (sf_stat_def *def); /* $Id$ */ Index: getstats.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/getstats.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- getstats.c 29 May 2004 12:55:09 -0000 1.14 +++ getstats.c 29 May 2004 17:29:28 -0000 1.15 @@ -33,7 +33,7 @@ sf_value get_stat_fs (sf_stat_def *def, sf_list *fslist) { sf_value res; - sf_fs_stats *fs = get_fs_entry_from_list (fslist, def->arg[1].path); + sf_fs_stat *fs = get_fs_entry_from_list (fslist, def->arg[1].path); sf_res_state slctr = def->arg[0].resstat; #ifdef DEBUG @@ -192,7 +192,7 @@ #endif } -void fetch_pathspace (sf_fs_stats *fs) +void fetch_pathspace (sf_fs_stat *fs) { struct statfs buf; long int bsizeKB; @@ -222,11 +222,11 @@ void fetch_fs (sf_database *db) { sf_list *hd = db->fs; - sf_fs_stats *fs; + sf_fs_stat *fs; // Iterate through list of watched paths while (hd) { - fs = (sf_fs_stats *) hd->el; + fs = (sf_fs_stat *) hd->el; if (fs) fetch_pathspace (fs); hd = hd->next; Index: datastruct.c =================================================================== RCS file: /cvsroot/sysfence/sysfence/datastruct.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- datastruct.c 29 May 2004 12:54:11 -0000 1.4 +++ datastruct.c 29 May 2004 17:29:28 -0000 1.5 @@ -90,7 +90,7 @@ * used to register new paths while parsing config file */ sf_list *l = *hd; - sf_fs_stats *e; + sf_fs_stat *e; #ifdef DEBUG if (!hd) @@ -103,19 +103,19 @@ if (! l) { /* end-of-list reached, add entry */ - e = (sf_fs_stats *) xalloc (NULL, sizeof (sf_fs_stats)); + e = (sf_fs_stat *) xalloc (NULL, sizeof (sf_fs_stat)); e->path = (char *) xalloc (NULL, strlen (path) + 1); strcpy (e->path, path); l = (sf_list *) xalloc (NULL, sizeof (sf_list)); l->next = NULL; - l->elsize = sizeof (sf_fs_stats); + l->elsize = sizeof (sf_fs_stat); l->el = (void *) e; *hd = l; return; } - e = (sf_fs_stats *) l->el; + e = (sf_fs_stat *) l->el; /* do not insert duplicates */ #ifdef DEBUG @@ -126,10 +126,10 @@ add_fs_entry_to_list (&(l->next), path); } -sf_fs_stats * get_fs_entry_from_list (sf_list *hd, char *path) +sf_fs_stat * get_fs_entry_from_list (sf_list *hd, char *path) { /* finds an entry in list of paths being watched */ - sf_fs_stats *st; + sf_fs_stat *st; #ifdef DEBUG syslog (LOG_DEBUG, "get_fs_entry_from_list(%x, %s)", hd, path); @@ -138,7 +138,7 @@ // not found if (! hd) return NULL; - st = (sf_fs_stats *) hd->el; + st = (sf_fs_stat *) hd->el; #ifdef DEBUG syslog (LOG_DEBUG, " +-- list element: %s)", st->path); #endif |