summaryrefslogtreecommitdiff
path: root/debian/patches/ftpfs_fix.patch
diff options
context:
space:
mode:
authorMichael Banck <mbanck@debian.org>2005-08-25 21:40:34 +0000
committerMichael Banck <mbanck@debian.org>2005-08-25 21:40:34 +0000
commit6149a773f9ab32dfccb216be92b10939f5205d08 (patch)
treef53a77c300c6e254eb473058f50757b9042bfc1b /debian/patches/ftpfs_fix.patch
parentef424dd1ea9ec6365631f50f89b53d5866876469 (diff)
Replaced debian/patches/ftpfs_fix.patch wiht a better version by Samuel Thibault
Diffstat (limited to 'debian/patches/ftpfs_fix.patch')
-rw-r--r--debian/patches/ftpfs_fix.patch65
1 files changed, 54 insertions, 11 deletions
diff --git a/debian/patches/ftpfs_fix.patch b/debian/patches/ftpfs_fix.patch
index 118c3775..db5be65a 100644
--- a/debian/patches/ftpfs_fix.patch
+++ b/debian/patches/ftpfs_fix.patch
@@ -1,16 +1,59 @@
-2005-07-28 Anders Juel Jensen <macavity@aracer.com>
+2005-07-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
- * node.c (netfs_node_norefs) <hurd_ihash_locp_remove>:
- Missing dereference of an argument.
+ * ihash.c (add_one): Correct cast.
---- ftpfs/node.c 1 Mar 2004 09:58:44 -0000 1.2
-+++ ftpfs/node.c 28 Jul 2005 18:14:47 -0000
-@@ -92,7 +92,7 @@
+2005-07-30 Samuel Thibault <samuel.thibault@ens-lyon.org>
- /* Remove this entry from the set of known inodes. */
+ * node.c (ftpfs_create_node): Add check for result of
+ hurd_ihash_add(), correct addition of dir entry.
+
+Index: libihash/ihash.c
+===================================================================
+RCS file: /cvsroot/hurd/hurd/libihash/ihash.c,v
+retrieving revision 1.9
+diff -u -u -p -r1.9 ihash.c
+--- libihash/ihash.c 2 Apr 2004 17:01:03 -0000 1.9
++++ libihash/ihash.c 30 Jul 2005 01:38:27 -0000
+@@ -329,7 +329,7 @@ add_one (hurd_ihash_t ht, hurd_ihash_key
+ ht->items[first_free].key = key;
+
+ if (ht->locp_offset != HURD_IHASH_NO_LOCP)
+- *((hurd_ihash_locp_t) (((char *) value) + ht->locp_offset))
++ *((hurd_ihash_locp_t *) (((char *) value) + ht->locp_offset))
+ = &ht->items[first_free].value;
+
+ return 1;
+
+Index: ftpfs/node.c
+===================================================================
+RCS file: /cvsroot/hurd/hurd/ftpfs/node.c,v
+retrieving revision 1.2
+diff -u -p -r1.2 node.c
+--- ftpfs/node.c 1 Mar 2004 09:58:44 -0000 1.2
++++ ftpfs/node.c 30 Jul 2005 01:38:07 -0000
+@@ -39,6 +39,7 @@ ftpfs_create_node (struct ftpfs_dir_entr
+ {
+ struct node *new;
+ struct netnode *nn = malloc (sizeof (struct netnode));
++ error_t err;
+
+ if (! nn)
+ return ENOMEM;
+@@ -61,9 +62,16 @@ ftpfs_create_node (struct ftpfs_dir_entr
+ ftpfs_maptime);
+
spin_lock (&nn->fs->inode_mappings_lock);
-- hurd_ihash_locp_remove (&nn->fs->inode_mappings, nn->dir_entry->inode_locp);
-+ hurd_ihash_locp_remove (&nn->fs->inode_mappings, &nn->dir_entry->inode_locp);
+- hurd_ihash_add (&nn->fs->inode_mappings, e->stat.st_ino, new);
++ err = hurd_ihash_add (&nn->fs->inode_mappings, e->stat.st_ino, e);
spin_unlock (&nn->fs->inode_mappings_lock);
-
- if (nn->contents)
+
++ if (err)
++ {
++ free(nn);
++ free(new);
++ return err;
++ }
++
+ e->node = new;
+ *node = new;
+