summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-11-16 23:17:34 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-11-16 23:17:34 +0100
commit7c4da1a1da9ad4c750a8cca3864f3e71ab6d67c5 (patch)
treeaa2656371fe40869101014f74d4dd4164e89ba11
parenta34607f4c1dde98cb0ab97f4f8066620927dcd40 (diff)
Fix 64b buildsfilter
-rw-r--r--filter.c10
-rw-r--r--filter.h2
-rw-r--r--trace.c4
3 files changed, 9 insertions, 7 deletions
diff --git a/filter.c b/filter.c
index fa1321ba9..9bb77e931 100644
--- a/filter.c
+++ b/filter.c
@@ -343,7 +343,7 @@ error_t
/*Attempts to set the passive translator record for `file` passing `argz`*/
error_t
netfs_set_translator
- (struct iouser * cred, struct node * node, const char *argz, size_t arglen)
+ (struct iouser * cred, struct node * node, const char *argz, mach_msg_type_number_t arglen)
{
LOG_MSG ("netfs_set_translator");
@@ -450,17 +450,19 @@ error_t
char *buf = data;
/*Try to read the requested information from the file */
- err = io_read (np->nn->port, &buf, len, offset, *len);
+ mach_msg_type_number_t num = *len;
+ err = io_read (np->nn->port, &buf, &num, offset, num);
+ *len = num;
/*If some data has been read successfully */
if (!err && (buf != data))
{
/*copy the data from the buffer into which it has just been read into
the supplied receiver */
- memcpy (data, buf, *len);
+ memcpy (data, buf, num);
/*unmap the new buffer */
- munmap (buf, *len);
+ munmap (buf, num);
}
/*Return the result of reading */
diff --git a/filter.h b/filter.h
index 6cf69380d..2e96efb57 100644
--- a/filter.h
+++ b/filter.h
@@ -154,7 +154,7 @@ error_t
/*Attempts to set the passive translator record for `file` passing `argz`*/
error_t
netfs_set_translator
- (struct iouser *cred, struct node *node, const char *argz, size_t arglen);
+ (struct iouser *cred, struct node *node, const char *argz, mach_msg_type_number_t arglen);
/*---------------------------------------------------------------------------*/
/*Attempts to call chflags for `node`*/
error_t
diff --git a/trace.c b/trace.c
index 4f72d81f1..9391eeee2 100644
--- a/trace.c
+++ b/trace.c
@@ -54,7 +54,7 @@ error_t
/*The name and arguments of the translator being passed now */
char *argz = NULL;
- size_t argz_len = 0;
+ mach_msg_type_number_t argz_len = 0;
/*The current working directory */
char *cwd = NULL;
@@ -155,7 +155,7 @@ error_t
char buf[256];
char *_buf = buf;
- size_t len = 256;
+ mach_msg_type_number_t len = 256;
io_read (node, &_buf, &len, 0, len);
LOG_MSG ("trace_find: Read from underlying: '%s'", buf);