diff mbox series

[04/12] libfrog: move convert.h to libfrog/

Message ID 156757176903.1838135.5839329434103512872.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series libfrog: move header files | expand

Commit Message

Darrick J. Wong Sept. 4, 2019, 4:36 a.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Move this header to libfrog since the code is there already.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 include/convert.h |   25 -------------------------
 include/input.h   |    2 +-
 libfrog/Makefile  |    1 +
 libfrog/convert.h |   25 +++++++++++++++++++++++++
 4 files changed, 27 insertions(+), 26 deletions(-)
 delete mode 100644 include/convert.h
 create mode 100644 libfrog/convert.h

Comments

Dave Chinner Sept. 4, 2019, 11:28 p.m. UTC | #1
On Tue, Sep 03, 2019 at 09:36:09PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Move this header to libfrog since the code is there already.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  include/convert.h |   25 -------------------------
>  include/input.h   |    2 +-
>  libfrog/Makefile  |    1 +
>  libfrog/convert.h |   25 +++++++++++++++++++++++++
>  4 files changed, 27 insertions(+), 26 deletions(-)
>  delete mode 100644 include/convert.h
>  create mode 100644 libfrog/convert.h

looks good.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
diff mbox series

Patch

diff --git a/include/convert.h b/include/convert.h
deleted file mode 100644
index 0489a1db..00000000
--- a/include/convert.h
+++ /dev/null
@@ -1,25 +0,0 @@ 
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Copyright (c) 2000-2005 Silicon Graphics, Inc.
- * All Rights Reserved.
- */
-#ifndef __CONVERT_H__
-#define __CONVERT_H__
-
-extern int64_t	cvt_s64(char *s, int base);
-extern int32_t	cvt_s32(char *s, int base);
-extern int16_t	cvt_s16(char *s, int base);
-
-extern uint64_t	cvt_u64(char *s, int base);
-extern uint32_t	cvt_u32(char *s, int base);
-extern uint16_t	cvt_u16(char *s, int base);
-
-extern long long cvtnum(size_t blocksize, size_t sectorsize, char *s);
-extern void cvtstr(double value, char *str, size_t sz);
-extern unsigned long cvttime(char *s);
-
-extern uid_t	uid_from_string(char *user);
-extern gid_t	gid_from_string(char *group);
-extern prid_t	prid_from_string(char *project);
-
-#endif	/* __CONVERT_H__ */
diff --git a/include/input.h b/include/input.h
index 6d8dbcc4..57fdd343 100644
--- a/include/input.h
+++ b/include/input.h
@@ -10,7 +10,7 @@ 
 #include <grp.h>
 #include <sys/types.h>
 #include "project.h"
-#include "convert.h"
+#include "libfrog/convert.h"
 #include <stdbool.h>
 
 extern char	**breakline(char *input, int *count);
diff --git a/libfrog/Makefile b/libfrog/Makefile
index 2b199b45..5ba32a22 100644
--- a/libfrog/Makefile
+++ b/libfrog/Makefile
@@ -31,6 +31,7 @@  HFILES = \
 avl64.h \
 bulkstat.h \
 bitmap.h \
+convert.h \
 crc32defs.h \
 crc32table.h \
 topology.h
diff --git a/libfrog/convert.h b/libfrog/convert.h
new file mode 100644
index 00000000..321540aa
--- /dev/null
+++ b/libfrog/convert.h
@@ -0,0 +1,25 @@ 
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ */
+#ifndef __LIBFROG_CONVERT_H__
+#define __LIBFROG_CONVERT_H__
+
+extern int64_t	cvt_s64(char *s, int base);
+extern int32_t	cvt_s32(char *s, int base);
+extern int16_t	cvt_s16(char *s, int base);
+
+extern uint64_t	cvt_u64(char *s, int base);
+extern uint32_t	cvt_u32(char *s, int base);
+extern uint16_t	cvt_u16(char *s, int base);
+
+extern long long cvtnum(size_t blocksize, size_t sectorsize, char *s);
+extern void cvtstr(double value, char *str, size_t sz);
+extern unsigned long cvttime(char *s);
+
+extern uid_t	uid_from_string(char *user);
+extern gid_t	gid_from_string(char *group);
+extern prid_t	prid_from_string(char *project);
+
+#endif	/* __LIBFROG_CONVERT_H__ */