aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/afio
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-09-30 07:36:20 +0800
committeredwin <edwin@FreeBSD.org>2003-09-30 07:36:20 +0800
commit13a4125ebc95a3db745c3a7f77464df0e5bc884e (patch)
tree8c59e7ee9bb91b82072c9573a2e93a9d90df5c21 /sysutils/afio
parent0610c7c907ecdf8001a4c150d805f23d169044bf (diff)
downloadfreebsd-ports-gnome-13a4125ebc95a3db745c3a7f77464df0e5bc884e.tar.gz
freebsd-ports-gnome-13a4125ebc95a3db745c3a7f77464df0e5bc884e.tar.zst
freebsd-ports-gnome-13a4125ebc95a3db745c3a7f77464df0e5bc884e.zip
[PATCH] sysutils/afio mangles FIFOs
When run under FreeBSD, `afio' will successfully back up FIFOs, but will not correctly restore them. The problem arises from `afio' using mknod(2) to try to create a FIFO - a Linuxism. The correct function for it to use is mkfifo(2). Also, `afio' tries to recreate sockets. This behavior should be disabled under FreeBSD. PR: ports/52452 Submitted by: oremanj <oremanj@get-linux.org> (boucnes)
Diffstat (limited to 'sysutils/afio')
-rw-r--r--sysutils/afio/Makefile1
-rw-r--r--sysutils/afio/files/patch-ab28
2 files changed, 26 insertions, 3 deletions
diff --git a/sysutils/afio/Makefile b/sysutils/afio/Makefile
index dbeeff9e123b..f2f54b84db37 100644
--- a/sysutils/afio/Makefile
+++ b/sysutils/afio/Makefile
@@ -7,6 +7,7 @@
PORTNAME= afio
PORTVERSION= 2.4.7
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/backup
diff --git a/sysutils/afio/files/patch-ab b/sysutils/afio/files/patch-ab
index 6dbf321690f4..fae1131cd3c1 100644
--- a/sysutils/afio/files/patch-ab
+++ b/sysutils/afio/files/patch-ab
@@ -1,6 +1,6 @@
---- afio.c.orig Fri Nov 26 01:24:39 1999
-+++ afio.c Thu Jan 27 14:23:28 2000
-@@ -609,7 +609,7 @@
+--- afio.c.orig Tue Oct 9 23:03:53 2001
++++ afio.c Mon Sep 29 16:34:02 2003
+@@ -613,7 +613,7 @@
aruntil, arbsize);
#else
fprintf (stderr, "Media size %ld is less than block size %d\n",
@@ -9,3 +9,25 @@
#endif
usage ();
}
+@@ -2929,10 +2929,10 @@
+ see out().
+ */
+ if(asb->sb_rdev==0) asb->sb_rdev=(asb->sb_dev << 16) + asb->sb_ino;
+- if (mknod (name, asb->sb_mode, asb->sb_rdev) < 0
++ if (mkfifo (name, asb->sb_mode) < 0
+ && (errno != ENOENT
+ || dirneed (name) < 0
+- || mknod (name, asb->sb_mode, asb->sb_rdev) < 0))
++ || mkfifo (name, asb->sb_mode) < 0))
+ return (warn (name, syserr ()));
+ break;
+ case S_IFDIR:
+@@ -2960,7 +2960,7 @@
+ return (warn (name, syserr ()));
+ break;
+ #endif /* S_IFIFO */
+-#ifdef S_IFSOCK
++#ifdef S_IFSOCK && !defined (__FreeBSD__)
+ case S_IFSOCK:
+ fd = 0;
+ if (exists)