mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-27 10:03:20 +00:00
ef262184db
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)
34 lines
979 B
Plaintext
34 lines
979 B
Plaintext
--- 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",
|
|
- (ulong) aruntil, arbsize);
|
|
+ (u_long) aruntil, arbsize);
|
|
#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)
|