summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/patches/fixes0001-libdiskfs-fix-typo.patch26
-rw-r--r--debian/patches/fixes0002-libdiskfs-add-missing-declarations.patch33
-rw-r--r--debian/patches/fixes0003-libdiskfs-rename-error-variable.patch360
-rw-r--r--debian/patches/series3
4 files changed, 422 insertions, 0 deletions
diff --git a/debian/patches/fixes0001-libdiskfs-fix-typo.patch b/debian/patches/fixes0001-libdiskfs-fix-typo.patch
new file mode 100644
index 00000000..784f8d43
--- /dev/null
+++ b/debian/patches/fixes0001-libdiskfs-fix-typo.patch
@@ -0,0 +1,26 @@
+From 26e0ea9356e45a2aa1810b99c4341ebf6298bf05 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Fri, 3 Jul 2015 21:47:21 +0200
+Subject: [PATCH hurd 1/3] libdiskfs: fix typo
+
+* libdiskfs/diskfs.h: Fix typo.
+---
+ libdiskfs/diskfs.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
+index 82a16b4..d98de8f 100644
+--- a/libdiskfs/diskfs.h
++++ b/libdiskfs/diskfs.h
+@@ -297,7 +297,7 @@ int diskfs_shortcut_ifsock;
+
+ /* The user may define this variable, otherwise it has a default value of 30.
+ diskfs_set_sync_interval is called with this value when the first diskfs
+- thread is started up (in diskfs_spawn_first_threa). */
++ thread is started up (in diskfs_spawn_first_thread). */
+ extern int diskfs_default_sync_interval;
+
+ /* The user must define this variable, which should be a string that somehow
+--
+2.1.4
+
diff --git a/debian/patches/fixes0002-libdiskfs-add-missing-declarations.patch b/debian/patches/fixes0002-libdiskfs-add-missing-declarations.patch
new file mode 100644
index 00000000..0066d112
--- /dev/null
+++ b/debian/patches/fixes0002-libdiskfs-add-missing-declarations.patch
@@ -0,0 +1,33 @@
+From e507800e47973422c080a308955f8d46edc5d706 Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Sun, 24 May 2015 14:37:20 +0200
+Subject: [PATCH hurd 2/3] libdiskfs: add missing declarations
+
+* libdiskfs/diskfs.h (diskfs_node_disknode): Add missing declaration.
+(diskfs_disknode_node): Likewise.
+---
+ libdiskfs/diskfs.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
+index d98de8f..11fb0ad 100644
+--- a/libdiskfs/diskfs.h
++++ b/libdiskfs/diskfs.h
+@@ -732,6 +732,14 @@ struct node *diskfs_make_node_alloc (size_t size);
+ this value for offset calculations. */
+ extern const size_t _diskfs_sizeof_struct_node;
+
++/* Return the address of the disknode for NODE. NODE must have been
++ allocated using diskfs_make_node_alloc. */
++struct disknode *diskfs_node_disknode (struct node *node);
++
++/* Return the address of the node for DISKNODE. DISKNODE must have
++ been allocated using diskfs_make_node_alloc. */
++struct node *diskfs_disknode_node (struct disknode *disknode);
++
+ #if defined(__USE_EXTERN_INLINES) || defined(DISKFS_DEFINE_EXTERN_INLINE)
+
+ /* Return the address of the disknode for NODE. NODE must have been
+--
+2.1.4
+
diff --git a/debian/patches/fixes0003-libdiskfs-rename-error-variable.patch b/debian/patches/fixes0003-libdiskfs-rename-error-variable.patch
new file mode 100644
index 00000000..bdabcd7d
--- /dev/null
+++ b/debian/patches/fixes0003-libdiskfs-rename-error-variable.patch
@@ -0,0 +1,360 @@
+From 346ace4c2f5e020ca654541ff4b34d86faf88a4d Mon Sep 17 00:00:00 2001
+From: Justus Winter <4winter@informatik.uni-hamburg.de>
+Date: Sat, 18 Apr 2015 01:34:40 +0200
+Subject: [PATCH hurd 3/3] libdiskfs: rename `error' variable
+
+* libdiskfs/dir-lookup.c (diskfs_S_dir_lookup): Rename `error' to `err'.
+* libdiskfs/file-getcontrol.c (diskfs_S_file_getcontrol): Likewise.
+* libdiskfs/file-syncfs.c (diskfs_S_file_syncfs): Likewise.
+---
+ libdiskfs/dir-lookup.c | 104 ++++++++++++++++++++++----------------------
+ libdiskfs/file-getcontrol.c | 14 +++---
+ libdiskfs/file-syncfs.c | 6 +--
+ 3 files changed, 62 insertions(+), 62 deletions(-)
+
+diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
+index f3364cd..75df9b8 100644
+--- a/libdiskfs/dir-lookup.c
++++ b/libdiskfs/dir-lookup.c
+@@ -43,7 +43,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ char *nextname;
+ char *relpath;
+ int nextnamelen;
+- error_t error = 0;
++ error_t err = 0;
+ char *pathbuf = 0;
+ int pathbuflen = 0;
+ int newnamelen;
+@@ -132,16 +132,16 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ {
+ if (!ds)
+ ds = alloca (diskfs_dirstat_size);
+- error = diskfs_lookup (dnp, path, CREATE, &np, ds, dircred);
++ err = diskfs_lookup (dnp, path, CREATE, &np, ds, dircred);
+ }
+ else
+- error = diskfs_lookup (dnp, path, LOOKUP, &np, 0, dircred);
++ err = diskfs_lookup (dnp, path, LOOKUP, &np, 0, dircred);
+
+- if (lastcomp && create && excl && (!error || error == EAGAIN))
+- error = EEXIST;
++ if (lastcomp && create && excl && (!err || err == EAGAIN))
++ err = EEXIST;
+
+ /* If we get an error we're done */
+- if (error == EAGAIN)
++ if (err == EAGAIN)
+ {
+ if (dnp == dircred->po->shadow_root)
+ /* We're at the root of a shadow tree. */
+@@ -151,7 +151,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ /* This is a shadow root with no parent, meaning
+ we should treat it as a virtual root disconnected
+ from its real .. directory. */
+- error = 0;
++ err = 0;
+ np = dnp;
+ diskfs_nref (np);
+ }
+@@ -163,7 +163,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ *returned_port_poly = MACH_MSG_TYPE_COPY_SEND;
+ if (! lastcomp)
+ strcpy (retryname, nextname);
+- error = 0;
++ err = 0;
+ goto out;
+ }
+ }
+@@ -177,13 +177,13 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ *returned_port_poly = MACH_MSG_TYPE_COPY_SEND;
+ if (!lastcomp)
+ strcpy (retryname, nextname);
+- error = 0;
++ err = 0;
+ goto out;
+ }
+ else
+ /* We're at a REAL root, as in there's no way up from here. */
+ {
+- error = 0;
++ err = 0;
+ np = dnp;
+ diskfs_nref (np);
+ }
+@@ -192,11 +192,11 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ /* Create the new node if necessary */
+ if (lastcomp && create)
+ {
+- if (error == ENOENT)
++ if (err == ENOENT)
+ {
+ mode &= ~(S_IFMT | S_ISPARE | S_ISVTX | S_ITRANS);
+ mode |= S_IFREG;
+- error = diskfs_create_node (dnp, path, mode, &np, dircred, ds);
++ err = diskfs_create_node (dnp, path, mode, &np, dircred, ds);
+ if (diskfs_synchronous)
+ {
+ diskfs_file_update (dnp, 1);
+@@ -208,7 +208,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ diskfs_drop_dirstat (dnp, ds);
+ }
+
+- if (error)
++ if (err)
+ goto out;
+
+ /* If this is translated, start the translator (if necessary)
+@@ -260,21 +260,21 @@ diskfs_S_dir_lookup (struct protid *dircred,
+
+ /* Create an unauthenticated port for DNP, and then
+ unlock it. */
+- error = iohelp_create_empty_iouser (&user);
+- if (! error)
++ err = iohelp_create_empty_iouser (&user);
++ if (! err)
+ {
+- error = diskfs_make_peropen (dnp, 0, dircred->po, &newpo);
+- if (! error)
++ err = diskfs_make_peropen (dnp, 0, dircred->po, &newpo);
++ if (! err)
+ {
+- error = diskfs_create_protid (newpo, user, &newpi);
+- if (! error)
++ err = diskfs_create_protid (newpo, user, &newpi);
++ if (! err)
+ newpo = 0;
+ }
+
+ iohelp_free_iouser (user);
+ }
+
+- if (error)
++ if (err)
+ goto out;
+
+ dirport = ports_get_send_right (newpi);
+@@ -288,7 +288,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ boolean_t register_translator =
+ np->transbox.active == MACH_PORT_NULL;
+
+- error = fshelp_fetch_root (&np->transbox, dircred->po,
++ err = fshelp_fetch_root (&np->transbox, dircred->po,
+ dirport, dircred->user,
+ lastcomp ? flags : 0,
+ ((np->dn_stat.st_mode & S_IPTRANS)
+@@ -301,10 +301,10 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ deallocate our send right. */
+ mach_port_deallocate (mach_task_self (), dirport);
+
+- if (error != ENOENT)
++ if (err != ENOENT)
+ {
+ *returned_port_poly = MACH_MSG_TYPE_MOVE_SEND;
+- if (!lastcomp && !error)
++ if (!lastcomp && !err)
+ {
+ char *end = strchr (retryname, '\0');
+ *end++ = '/';
+@@ -333,12 +333,12 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ else
+ asprintf (&complete_path, "%s/%s", dircred->po->path, translator_path);
+
+- error = fshelp_set_active_translator (&newpi->pi,
++ err = fshelp_set_active_translator (&newpi->pi,
+ complete_path,
+ np->transbox.active);
+ if (complete_path != translator_path)
+ free(complete_path);
+- if (error)
++ if (err)
+ goto out;
+ }
+
+@@ -351,7 +351,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ /* ENOENT means there was a hiccup, and the translator
+ vanished while NP was unlocked inside fshelp_fetch_root.
+ Reacquire the locks, and continue as normal. */
+- error = 0;
++ err = 0;
+ if (np != dnp)
+ {
+ if (!strcmp (path, ".."))
+@@ -377,7 +377,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+
+ if (nsymlink++ > diskfs_maxsymlinks)
+ {
+- error = ELOOP;
++ err = ELOOP;
+ goto out;
+ }
+
+@@ -390,16 +390,16 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ }
+
+ if (diskfs_read_symlink_hook)
+- error = (*diskfs_read_symlink_hook)(np, pathbuf);
+- if (!diskfs_read_symlink_hook || error == EINVAL)
++ err = (*diskfs_read_symlink_hook)(np, pathbuf);
++ if (!diskfs_read_symlink_hook || err == EINVAL)
+ {
+- error = diskfs_node_rdwr (np, pathbuf,
++ err = diskfs_node_rdwr (np, pathbuf,
+ 0, np->dn_stat.st_size, 0,
+ dircred, &amt);
+- if (!error)
++ if (!err)
+ assert (amt == np->dn_stat.st_size);
+ }
+- if (error)
++ if (err)
+ goto out;
+
+ if (np->dn_stat.st_size == 0) /* symlink to "" */
+@@ -471,7 +471,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+
+ if (mustbedir && type != S_IFDIR)
+ {
+- error = ENOTDIR;
++ err = ENOTDIR;
+ goto out;
+ }
+
+@@ -482,25 +482,25 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ type == S_IFIFO)
+ && (flags & (O_READ|O_WRITE|O_EXEC)))
+ || (type == S_IFLNK && (flags & (O_WRITE|O_EXEC))))
+- error = EACCES;
++ err = EACCES;
+
+- if (!error && (flags & O_READ))
+- error = fshelp_access (&np->dn_stat, S_IREAD, dircred->user);
++ if (!err && (flags & O_READ))
++ err = fshelp_access (&np->dn_stat, S_IREAD, dircred->user);
+
+- if (!error && (flags & O_EXEC))
+- error = fshelp_access (&np->dn_stat, S_IEXEC, dircred->user);
++ if (!err && (flags & O_EXEC))
++ err = fshelp_access (&np->dn_stat, S_IEXEC, dircred->user);
+
+- if (!error && (flags & O_WRITE))
++ if (!err && (flags & O_WRITE))
+ {
+ if (type == S_IFDIR)
+- error = EISDIR;
++ err = EISDIR;
+ else if (diskfs_check_readonly ())
+- error = EROFS;
++ err = EROFS;
+ else
+- error = fshelp_access (&np->dn_stat, S_IWRITE, dircred->user);
++ err = fshelp_access (&np->dn_stat, S_IWRITE, dircred->user);
+ }
+
+- if (error)
++ if (err)
+ goto out;
+ }
+
+@@ -508,24 +508,24 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ && (fshelp_isowner (&np->dn_stat, dircred->user) == EPERM))
+ flags &= ~O_NOATIME;
+
+- error = diskfs_make_peropen (np, (flags &~OPENONLY_STATE_MODES),
++ err = diskfs_make_peropen (np, (flags &~OPENONLY_STATE_MODES),
+ dircred->po, &newpo);
+
+- if (! error)
+- error = diskfs_create_protid (newpo, dircred->user, &newpi);
++ if (! err)
++ err = diskfs_create_protid (newpo, dircred->user, &newpi);
+
+- if (! error)
++ if (! err)
+ {
+ newpo = 0;
+ if (flags & O_EXLOCK)
+- error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
++ err = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
+ &np->lock, LOCK_EX);
+ else if (flags & O_SHLOCK)
+- error = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
++ err = fshelp_acquire_lock (&np->userlock, &newpi->po->lock_status,
+ &np->lock, LOCK_SH);
+ }
+
+- if (! error)
++ if (! err)
+ {
+ free (newpi->po->path);
+ if (dircred->po->path == NULL || !strcmp (dircred->po->path,"."))
+@@ -541,7 +541,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
+ }
+
+ if (! newpi->po->path)
+- error = errno;
++ err = errno;
+
+ *returned_port = ports_get_right (newpi);
+ ports_port_deref (newpi);
+@@ -566,5 +566,5 @@ diskfs_S_dir_lookup (struct protid *dircred,
+
+ free (relpath);
+
+- return error;
++ return err;
+ }
+diff --git a/libdiskfs/file-getcontrol.c b/libdiskfs/file-getcontrol.c
+index fc6f777..8f98f4b 100644
+--- a/libdiskfs/file-getcontrol.c
++++ b/libdiskfs/file-getcontrol.c
+@@ -25,20 +25,20 @@ diskfs_S_file_getcontrol (struct protid *cred,
+ mach_port_t *control,
+ mach_msg_type_name_t *controltype)
+ {
+- int error;
++ error_t err;
+ struct port_info *newpi;
+
+ if (!cred)
+ return EOPNOTSUPP;
+
+- error = fshelp_iscontroller (&diskfs_root_node->dn_stat, cred->user);
+- if (error)
+- return error;
++ err = fshelp_iscontroller (&diskfs_root_node->dn_stat, cred->user);
++ if (err)
++ return err;
+
+- error = ports_create_port (diskfs_control_class, diskfs_port_bucket,
++ err = ports_create_port (diskfs_control_class, diskfs_port_bucket,
+ sizeof (struct port_info), &newpi);
+- if (error)
+- return error;
++ if (err)
++ return err;
+
+ pthread_spin_lock (&_diskfs_control_lock);
+ _diskfs_ncontrol_ports++;
+diff --git a/libdiskfs/file-syncfs.c b/libdiskfs/file-syncfs.c
+index b7d20a8..2faab6a 100644
+--- a/libdiskfs/file-syncfs.c
++++ b/libdiskfs/file-syncfs.c
+@@ -28,12 +28,12 @@ diskfs_S_file_syncfs (struct protid *cred,
+ error_t
+ helper (struct node *np)
+ {
+- error_t error;
++ error_t err;
+ mach_port_t control;
+
+- error = fshelp_fetch_control (&np->transbox, &control);
++ err = fshelp_fetch_control (&np->transbox, &control);
+ pthread_mutex_unlock (&np->lock);
+- if (!error && (control != MACH_PORT_NULL))
++ if (!err && (control != MACH_PORT_NULL))
+ {
+ fsys_syncfs (control, wait, 1);
+ mach_port_deallocate (mach_task_self (), control);
+--
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index bc7f5da8..657c4b31 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -71,3 +71,6 @@ introspection0006-libpager-annotate-objects-managed-by-libports.patch
introspection0007-ext2fs-annotate-objects-managed-by-libports.patch
introspection0008-utils-rpctrace-support-attaching-to-servers.patch
+fixes0001-libdiskfs-fix-typo.patch
+fixes0002-libdiskfs-add-missing-declarations.patch
+fixes0003-libdiskfs-rename-error-variable.patch