From d2d9a751b172edb2b3aee613cf4bbe06ff5a07c8 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 6 Oct 2020 13:15:43 -0400 Subject: mtab: Adjust some naming conventions --- ctx.c | 4 ++-- mtab.c | 6 +++--- mtab.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ctx.c b/ctx.c index 6146b3c..065abcd 100644 --- a/ctx.c +++ b/ctx.c @@ -102,7 +102,7 @@ const struct bfs_mtab *bfs_ctx_mtab(const struct bfs_ctx *ctx) { if (mut->mtab_error) { errno = mut->mtab_error; } else if (!mut->mtab) { - mut->mtab = bfs_parse_mtab(); + mut->mtab = bfs_mtab_parse(); if (!mut->mtab) { mut->mtab_error = errno; } @@ -184,7 +184,7 @@ int bfs_ctx_free(struct bfs_ctx *ctx) { free_expr(ctx->expr); free_expr(ctx->exclude); - bfs_free_mtab(ctx->mtab); + bfs_mtab_free(ctx->mtab); bfs_free_groups(ctx->groups); bfs_free_users(ctx->users); diff --git a/mtab.c b/mtab.c index 50b01be..4f1b9be 100644 --- a/mtab.c +++ b/mtab.c @@ -102,7 +102,7 @@ fail: return -1; } -struct bfs_mtab *bfs_parse_mtab() { +struct bfs_mtab *bfs_mtab_parse() { struct bfs_mtab *mtab = malloc(sizeof(*mtab)); if (!mtab) { return NULL; @@ -189,7 +189,7 @@ struct bfs_mtab *bfs_parse_mtab() { return mtab; fail: - bfs_free_mtab(mtab); + bfs_mtab_free(mtab); errno = error; return NULL; } @@ -230,7 +230,7 @@ bool bfs_might_be_mount(const struct bfs_mtab *mtab, const char *path) { return trie_find_str(&mtab->names, name); } -void bfs_free_mtab(struct bfs_mtab *mtab) { +void bfs_mtab_free(struct bfs_mtab *mtab) { if (mtab) { trie_destroy(&mtab->types); trie_destroy(&mtab->names); diff --git a/mtab.h b/mtab.h index b2f057d..1f2f70f 100644 --- a/mtab.h +++ b/mtab.h @@ -35,7 +35,7 @@ struct bfs_mtab; * @return * The parsed mount table, or NULL on error. */ -struct bfs_mtab *bfs_parse_mtab(void); +struct bfs_mtab *bfs_mtab_parse(void); /** * Determine the file system type that a file is on. @@ -65,6 +65,6 @@ bool bfs_might_be_mount(const struct bfs_mtab *mtab, const char *path); /** * Free a mount table. */ -void bfs_free_mtab(struct bfs_mtab *mtab); +void bfs_mtab_free(struct bfs_mtab *mtab); #endif // BFS_MTAB_H -- cgit v1.2.3