From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> Move this header to libfrog since the code is there already. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- include/Makefile | 1 - include/input.h | 2 +- include/project.h | 39 --------------------------------------- libfrog/Makefile | 1 + libfrog/paths.c | 2 +- libfrog/projects.c | 2 +- libfrog/projects.h | 39 +++++++++++++++++++++++++++++++++++++++ quota/quota.h | 2 +- 8 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 include/project.h create mode 100644 libfrog/projects.h diff --git a/include/Makefile b/include/Makefile index fc90bc48..a80867e4 100644 --- a/include/Makefile +++ b/include/Makefile @@ -28,7 +28,6 @@ LIBHFILES = libxfs.h \ xfs_trans.h \ command.h \ input.h \ - project.h \ platform_defs.h HFILES = handle.h \ diff --git a/include/input.h b/include/input.h index 57fdd343..3c3fa116 100644 --- a/include/input.h +++ b/include/input.h @@ -9,7 +9,7 @@ #include <pwd.h> #include <grp.h> #include <sys/types.h> -#include "project.h" +#include "libfrog/projects.h" #include "libfrog/convert.h" #include <stdbool.h> diff --git a/include/project.h b/include/project.h deleted file mode 100644 index 3577dadb..00000000 --- a/include/project.h +++ /dev/null @@ -1,39 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0 -/* - * Copyright (c) 2005 Silicon Graphics, Inc. - * All Rights Reserved. - */ -#ifndef __PROJECT_H__ -#define __PROJECT_H__ - -#include "platform_defs.h" -#include "xfs.h" - -extern int setprojid(const char *__name, int __fd, prid_t __id); -extern int getprojid(const char *__name, int __fd, prid_t *__id); - -typedef struct fs_project { - prid_t pr_prid; /* project identifier */ - char *pr_name; /* project name */ -} fs_project_t; - -extern void setprent(void); -extern void endprent(void); -extern fs_project_t *getprent(void); -extern fs_project_t *getprnam(char *__name); -extern fs_project_t *getprprid(prid_t __id); - -typedef struct fs_project_path { - prid_t pp_prid; /* project identifier */ - char *pp_pathname; /* pathname to root of project tree */ -} fs_project_path_t; - -extern void setprpathent(void); -extern void endprpathent(void); -extern fs_project_path_t *getprpathent(void); - -extern void setprfiles(void); -extern char *projid_file; -extern char *projects_file; - -#endif /* __PROJECT_H__ */ diff --git a/libfrog/Makefile b/libfrog/Makefile index f8f7de68..25b5a03c 100644 --- a/libfrog/Makefile +++ b/libfrog/Makefile @@ -38,6 +38,7 @@ crc32defs.h \ crc32table.h \ fsgeom.h \ paths.h \ +projects.h \ ptvar.h \ radix-tree.h \ topology.h \ diff --git a/libfrog/paths.c b/libfrog/paths.c index f0f4548e..32737223 100644 --- a/libfrog/paths.c +++ b/libfrog/paths.c @@ -14,7 +14,7 @@ #include <sys/stat.h> #include "paths.h" #include "input.h" -#include "project.h" +#include "projects.h" #include <limits.h> extern char *progname; diff --git a/libfrog/projects.c b/libfrog/projects.c index 91bc78f2..dbde9702 100644 --- a/libfrog/projects.c +++ b/libfrog/projects.c @@ -7,7 +7,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include "project.h" +#include "projects.h" #define PROJID "/etc/projid" #define PROJECT_PATHS "/etc/projects" diff --git a/libfrog/projects.h b/libfrog/projects.h new file mode 100644 index 00000000..77919474 --- /dev/null +++ b/libfrog/projects.h @@ -0,0 +1,39 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2005 Silicon Graphics, Inc. + * All Rights Reserved. + */ +#ifndef __LIBFROG_PROJECTS_H__ +#define __LIBFROG_PROJECTS_H__ + +#include "platform_defs.h" +#include "xfs.h" + +extern int setprojid(const char *__name, int __fd, prid_t __id); +extern int getprojid(const char *__name, int __fd, prid_t *__id); + +typedef struct fs_project { + prid_t pr_prid; /* project identifier */ + char *pr_name; /* project name */ +} fs_project_t; + +extern void setprent(void); +extern void endprent(void); +extern fs_project_t *getprent(void); +extern fs_project_t *getprnam(char *__name); +extern fs_project_t *getprprid(prid_t __id); + +typedef struct fs_project_path { + prid_t pp_prid; /* project identifier */ + char *pp_pathname; /* pathname to root of project tree */ +} fs_project_path_t; + +extern void setprpathent(void); +extern void endprpathent(void); +extern fs_project_path_t *getprpathent(void); + +extern void setprfiles(void); +extern char *projid_file; +extern char *projects_file; + +#endif /* __LIBFROG_PROJECTS_H__ */ diff --git a/quota/quota.h b/quota/quota.h index 5db0a741..025d8877 100644 --- a/quota/quota.h +++ b/quota/quota.h @@ -6,7 +6,7 @@ #include "xqm.h" #include "libfrog/paths.h" -#include "project.h" +#include "libfrog/projects.h" #include <stdbool.h> /*