diff options
author | stefan <stefan@FreeBSD.org> | 2007-09-25 01:18:06 +0800 |
---|---|---|
committer | stefan <stefan@FreeBSD.org> | 2007-09-25 01:18:06 +0800 |
commit | 514ad5f092e2aab99fbf4292177a2b83e8b96abd (patch) | |
tree | 29b33ad09b5623e5407ec42bd55c184966507c92 /sysutils/cramfs | |
parent | 1eb4ac78b411348d8a1d7e654db237f58f411619 (diff) | |
download | freebsd-ports-gnome-514ad5f092e2aab99fbf4292177a2b83e8b96abd.tar.gz freebsd-ports-gnome-514ad5f092e2aab99fbf4292177a2b83e8b96abd.tar.zst freebsd-ports-gnome-514ad5f092e2aab99fbf4292177a2b83e8b96abd.zip |
- Fix failing mmap calls in mkcramfs by correctly defining a constant.
- Call mkfifo instead of mknod for creating FIFOs to fix cramfsck.
PR: 116292
Submitted by: Christopher Hall <freebsd@generalresources.com>
Approved by: maintainer
Diffstat (limited to 'sysutils/cramfs')
-rw-r--r-- | sysutils/cramfs/Makefile | 1 | ||||
-rw-r--r-- | sysutils/cramfs/files/patch-cramfsck.c | 20 | ||||
-rw-r--r-- | sysutils/cramfs/files/patch-mkcramfs.c | 2 |
3 files changed, 22 insertions, 1 deletions
diff --git a/sysutils/cramfs/Makefile b/sysutils/cramfs/Makefile index 5c4646583248..e550f5243f39 100644 --- a/sysutils/cramfs/Makefile +++ b/sysutils/cramfs/Makefile @@ -7,6 +7,7 @@ PORTNAME= cramfs PORTVERSION= 1.1 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SOURCEFORGE MASTER_SITE_SUBDIR= cramfs diff --git a/sysutils/cramfs/files/patch-cramfsck.c b/sysutils/cramfs/files/patch-cramfsck.c index cfd6aca01c5f..9a685b5565dc 100644 --- a/sysutils/cramfs/files/patch-cramfsck.c +++ b/sysutils/cramfs/files/patch-cramfsck.c @@ -17,3 +17,23 @@ /* 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/sysutils/cramfs/files/patch-mkcramfs.c b/sysutils/cramfs/files/patch-mkcramfs.c index faf00df0d7df..5e4f1328f7a5 100644 --- a/sysutils/cramfs/files/patch-mkcramfs.c +++ b/sysutils/cramfs/files/patch-mkcramfs.c @@ -4,7 +4,7 @@ #include <linux/cramfs_fs.h> #include <zlib.h> -+#define MAP_ANONYMOUS 0x20 ++#define MAP_ANONYMOUS MAP_ANON +typedef long long loff_t; + /* Exit codes used by mkfs-type programs */ |