summaryrefslogtreecommitdiff
path: root/filesystems/cramfs/files
diff options
context:
space:
mode:
authorRobert Clausecker <fuz@FreeBSD.org>2024-09-27 12:48:46 +0200
committerRobert Clausecker <fuz@FreeBSD.org>2024-11-06 16:17:35 +0100
commit6e2da9672f79f44048d597f0f61e4646cdeade9d (patch)
treec92e4b3158e3419e8cec38e00227d08dcdaab3e9 /filesystems/cramfs/files
parentmath/sdpa: speed up build (diff)
filesystems: add new category for file systems and related utilities
The filesystems category houses file systems and file system utilities. It is added mainly to turn the sysutils/fusefs-* pseudo-category into a proper one, but is also useful for the sundry of other file systems related ports found in the tree. Ports that seem like they belong there are moved to the new category. Two ports, sysutils/fusefs-funionfs and sysutils/fusefs-fusepak are not moved as they currently don't fetch and don't have TIMESTAMP set in their distinfo, but that is required to be able to push a rename of the port by the pre-receive hook. Approved by: portmgr (rene) Reviewed by: mat Pull Request: https://github.com/freebsd/freebsd-ports/pull/302 PR: 281988
Diffstat (limited to 'filesystems/cramfs/files')
-rw-r--r--filesystems/cramfs/files/patch-GNUmakefile10
-rw-r--r--filesystems/cramfs/files/patch-cramfsck.c39
-rw-r--r--filesystems/cramfs/files/patch-mkcramfs.c12
3 files changed, 61 insertions, 0 deletions
diff --git a/filesystems/cramfs/files/patch-GNUmakefile b/filesystems/cramfs/files/patch-GNUmakefile
new file mode 100644
index 000000000000..39ee95d61ca9
--- /dev/null
+++ b/filesystems/cramfs/files/patch-GNUmakefile
@@ -0,0 +1,10 @@
+--- GNUmakefile.orig Wed Nov 29 12:51:59 2006
++++ GNUmakefile Wed Nov 29 12:52:06 2006
+@@ -1,5 +1,5 @@
+-CC = gcc
+-CFLAGS = -W -Wall -O2 -g
++CC ?= gcc
++CFLAGS ?= -W -Wall -O2 -g
+ CPPFLAGS = -I.
+ LDLIBS = -lz
+ PROGS = mkcramfs cramfsck
diff --git a/filesystems/cramfs/files/patch-cramfsck.c b/filesystems/cramfs/files/patch-cramfsck.c
new file mode 100644
index 000000000000..9a685b5565dc
--- /dev/null
+++ b/filesystems/cramfs/files/patch-cramfsck.c
@@ -0,0 +1,39 @@
+--- cramfsck.c.orig Wed Nov 29 12:49:40 2006
++++ cramfsck.c Wed Nov 29 12:51:12 2006
+@@ -47,13 +47,14 @@
+ #include <stdlib.h>
+ #include <errno.h>
+ #include <string.h>
+-#include <sys/sysmacros.h>
+ #include <utime.h>
+ #include <sys/ioctl.h>
+ #define _LINUX_STRING_H_
+-#include <linux/fs.h>
+ #include <linux/cramfs_fs.h>
+ #include <zlib.h>
++
++#define BLKGETSIZE _IO(0x12,96)
++#define MAP_ANONYMOUS 0x20
+
+ /* Exit codes used by fsck-type programs */
+ #define FSCK_OK 0 /* No errors */
+@@ -603,8 +603,17 @@
+ }
+
+ if (opt_extract) {
+- if (mknod(path, i->mode, devtype) < 0) {
+- die(FSCK_ERROR, 1, "mknod failed: %s", path);
++ switch(type) {
++ default:
++ if (mknod(path, i->mode, devtype) < 0) {
++ die(FSCK_ERROR, 1, "mknod failed: %s", path);
++ }
++ break;
++ case 'p':
++ if (mkfifo(path, i->mode) < 0) {
++ die(FSCK_ERROR, 1, "mkfifo failed: %s", path);
++ }
++ break;
+ }
+ change_file_status(path, i);
+ }
diff --git a/filesystems/cramfs/files/patch-mkcramfs.c b/filesystems/cramfs/files/patch-mkcramfs.c
new file mode 100644
index 000000000000..5e4f1328f7a5
--- /dev/null
+++ b/filesystems/cramfs/files/patch-mkcramfs.c
@@ -0,0 +1,12 @@
+--- mkcramfs.c.orig Wed Nov 29 12:47:30 2006
++++ mkcramfs.c Wed Nov 29 12:49:25 2006
+@@ -36,6 +36,9 @@
+ #include <linux/cramfs_fs.h>
+ #include <zlib.h>
+
++#define MAP_ANONYMOUS MAP_ANON
++typedef long long loff_t;
++
+ /* Exit codes used by mkfs-type programs */
+ #define MKFS_OK 0 /* No errors */
+ #define MKFS_ERROR 8 /* Operational error */