]> arthur.barton.de Git - netatalk.git/commitdiff
linux with vfat fs sends SIGXFSZ even for files with O_LARGEFILE. There's
authordidg <didg>
Mon, 13 Oct 2003 22:05:17 +0000 (22:05 +0000)
committerdidg <didg>
Mon, 13 Oct 2003 22:05:17 +0000 (22:05 +0000)
unresolved issue with vfat and call to rename (.tempxxx,....) in AFP exchangefile.

etc/afpd/main.c
libatalk/adouble/ad_write.c

index b4905af17351933d41dbe153fab11a1ef521cd01..0e2d6a8b2b2a6e19776a9ae0421c0e298e69e7b9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: main.c,v 1.20.4.2.2.2 2003-09-12 18:44:17 didg Exp $
+ * $Id: main.c,v 1.20.4.2.2.3 2003-10-13 22:05:17 didg Exp $
  *
  * Copyright (c) 1990,1993 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -205,7 +205,15 @@ char       **av;
         LOG(log_error, logtype_afpd, "main: server_child alloc: %s", strerror(errno) );
         afp_exit(1);
     }
-
+    
+#ifdef AFP3x
+    /* linux at least up to 2.4.22 send a SIGXFZ for vfat fs,
+       even if the file is open with O_LARGEFILE ! */
+#ifdef SIGXFSZ
+    signal(SIGXFSZ , SIG_IGN); 
+#endif
+#endif    
+    
     memset(&sv, 0, sizeof(sv));
     sv.sa_handler = child_handler;
     sigemptyset( &sv.sa_mask );
index 7ffc90b13aa8de4b6c5cf6a4e3115c6a9e65a076..47347f72ca96e23e5b67b3ae9f1c01641652a720 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ad_write.c,v 1.7.6.1 2003-10-13 18:23:51 didg Exp $
+ * $Id: ad_write.c,v 1.7.6.2 2003-10-13 22:05:17 didg Exp $
  *
  * Copyright (c) 1990,1995 Regents of The University of Michigan.
  * All Rights Reserved.  See COPYRIGHT.
@@ -114,7 +114,7 @@ char            c = 0;
 
 #ifndef  HAVE_PWRITE
     /* we only care about file pointer if we don't use pwrite */
-    if ((off_t)-1 == (curpos) = lseek(fd, 0, SEEK_CUR))) {
+    if ((off_t)-1 == (curpos = lseek(fd, 0, SEEK_CUR)) ) {
         errno = err;
         return -1;
     }
@@ -136,7 +136,7 @@ char            c = 0;
     }
 
     if (1 != write( fd, &c, 1 )) {
-        errno = err;
+        /* return the write errno */
         return -1;
     }