/scrub/xfs_scrub_fail@.service
# generated crc files
-/libxfs/crc32selftest
-/libxfs/crc32table.h
-/libxfs/gen_crc32table
+/libfrog/crc32selftest
+/libfrog/crc32table.h
+/libfrog/gen_crc32table
--- /dev/null
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2000-2005 Silicon Graphics, Inc.
+ * All Rights Reserved.
+ */
+#ifndef LIBFROG_CRC32C_H_
+#define LIBFROG_CRC32C_H_
+
+extern uint32_t crc32c_le(uint32_t crc, unsigned char const *p, size_t len);
+
+#endif /* LIBFROG_CRC32C_H_ */
CFILES = \
avl64.c \
convert.c \
+crc32.c \
fsgeom.c \
list_sort.c \
paths.c \
util.c \
workqueue.c
+HFILES = \
+crc32defs.h \
+crc32table.h
+
+LSRCFILES += gen_crc32table.c
+
CFILES += $(PKG_PLATFORM).c
PCFILES = darwin.c freebsd.c irix.c linux.c
LSRCFILES = $(shell echo $(PCFILES) | sed -e "s/$(PKG_PLATFORM).c//g")
LCFLAGS += -DHAVE_GETMNTINFO
endif
-default: ltdepend $(LTLIBRARY)
+LDIRT = gen_crc32table crc32table.h crc32selftest
+
+default: crc32selftest ltdepend $(LTLIBRARY)
+
+crc32table.h: gen_crc32table.c crc32defs.h
+ @echo " [CC] gen_crc32table"
+ $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
+ @echo " [GENERATE] $@"
+ $(Q) ./gen_crc32table > crc32table.h
+
+# The selftest binary will return an error if it fails. This is made a
+# dependency of the build process so that we refuse to build the tools on broken
+# systems/architectures. Hence we make sure that xfsprogs will never use a
+# busted CRC calculation at build time and hence avoid putting bad CRCs down on
+# disk.
+crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
+ @echo " [TEST] CRC32"
+ $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
+ $(Q) ./$@
include $(BUILDRULES)
libxfs_io.h \
libxfs_api_defs.h \
init.h \
- crc32defs.h \
- crc32table.h \
libxfs_priv.h \
xfs_dir2_priv.h
CFILES = cache.c \
- crc32.c \
defer_item.c \
init.c \
kmem.c \
xfs_trans_resv.c \
xfs_types.c
-LSRCFILES += gen_crc32table.c
-
#
# Tracing flags:
# -DIO_DEBUG reads and writes of buffers
# don't try linking xfs_repair with a debug libxfs.
DEBUG = -DNDEBUG
-LDIRT = gen_crc32table crc32table.h crc32selftest
-
-default: crc32selftest ltdepend $(LTLIBRARY)
-
-crc32table.h: gen_crc32table.c crc32defs.h
- @echo " [CC] gen_crc32table"
- $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -o gen_crc32table $<
- @echo " [GENERATE] $@"
- $(Q) ./gen_crc32table > crc32table.h
-
-# The selftest binary will return an error if it fails. This is made a
-# dependency of the build process so that we refuse to build the tools on broken
-# systems/architectures. Hence we make sure that xfsprogs will never use a
-# busted CRC calculation at build time and hence avoid putting bad CRCs down on
-# disk.
-crc32selftest: gen_crc32table.c crc32table.h crc32.c crc32defs.h
- @echo " [TEST] CRC32"
- $(Q) $(BUILD_CC) $(BUILD_CFLAGS) -D CRC32_SELFTEST=1 crc32.c -o $@
- $(Q) ./$@
+default: ltdepend $(LTLIBRARY)
# set up include/xfs header directory
include $(BUILDRULES)
#include "xfs_arch.h"
#include "xfs_fs.h"
+#include "crc32c.h"
/* CRC stuff, buffer API dependent on it */
-extern uint32_t crc32c_le(uint32_t crc, unsigned char const *p, size_t len);
#define crc32c(c,p,l) crc32c_le((c),(unsigned char const *)(p),(l))
#include "xfs_cksum.h"