diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-11-16 23:17:34 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-11-16 23:17:34 +0100 |
commit | 7c4da1a1da9ad4c750a8cca3864f3e71ab6d67c5 (patch) | |
tree | aa2656371fe40869101014f74d4dd4164e89ba11 | |
parent | a34607f4c1dde98cb0ab97f4f8066620927dcd40 (diff) |
Fix 64b buildsfilter
-rw-r--r-- | filter.c | 10 | ||||
-rw-r--r-- | filter.h | 2 | ||||
-rw-r--r-- | trace.c | 4 |
3 files changed, 9 insertions, 7 deletions
@@ -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 */ @@ -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 @@ -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); |