From 67a9890063b9c5327ee1b89f857826235c9f63dc Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Tue, 9 May 2023 00:31:28 +0300 Subject: fatfs: Port to x86_64 Message-Id: <20230508213136.608575-34-bugaevc@gmail.com> --- fatfs/dir.c | 6 +++--- fatfs/main.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fatfs/dir.c b/fatfs/dir.c index 2679a0ce..71974642 100644 --- a/fatfs/dir.c +++ b/fatfs/dir.c @@ -659,7 +659,7 @@ diskfs_direnter_hard (struct node *dp, const char *name, struct node *np, vi_key_t entry_key; entry_key.dir_inode = dp->cache_id; - entry_key.dir_offset = ((int) ds->entry) - ((int) ds->mapbuf); + entry_key.dir_offset = (uintptr_t) ds->entry - (uintptr_t) ds->mapbuf; /* Set the key for this inode now because it wasn't know when the inode was initialized. */ @@ -727,7 +727,7 @@ diskfs_dirrewrite_hard (struct node *dp, struct node *np, struct dirstat *ds) /* We need the inode and vinode of the old node. */ entry_key.dir_inode = dp->cache_id; - entry_key.dir_offset = ((int) ds->entry) - ((int) ds->mapbuf); + entry_key.dir_offset = (uintptr_t) ds->entry - (uintptr_t) ds->mapbuf; err = vi_rlookup (entry_key, &inode, &vinode, 0); assert_backtrace (err != EINVAL); if (err) @@ -832,7 +832,7 @@ diskfs_get_directs (struct node *dp, int entry, int nentries, char **data, - u_int *datacnt, + size_t *datacnt, vm_size_t bufsiz, int *amt) { diff --git a/fatfs/main.c b/fatfs/main.c index 6b03b20e..5ece199b 100644 --- a/fatfs/main.c +++ b/fatfs/main.c @@ -110,7 +110,7 @@ struct argp *diskfs_runtime_argp = (struct argp *) &runtime_argp; /* Override the standard diskfs routine so we can add our own output. */ error_t -diskfs_append_args (char **argz, unsigned *argz_len) +diskfs_append_args (char **argz, size_t *argz_len) { error_t err; char buf[100]; -- cgit v1.2.3