From 0d1e89c38f0d99f5bab0c5a52e21d1efd87fbd76 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sat, 27 Jul 2019 11:57:44 +0200 Subject: diskfs.h: Expose 64bit types We build hurd with LFS64, so we should always expose LFS64 types, so callers do not have to build with -D_FILE_OFFSET_BITS=64. * libdiskfs/diskfs.h (struct peropen): Make `filepointer' field type `loff_t' instead of `off_t'. (diskfs_cached_ifind): Make `inum' parameter `ino64_t' instead of `ino_t'. (diskfs_cached_lookup_context): Likewise. * hurd/shared.h (strcut shared_io): Make `read_size', `prenotify_size', `postnotify_size', `readnotify_size', `rd_file_pointer', `wr_file_pointer', `xx_file_pointer', `file_size' fields type `loff_t' instead of `off_t'. --- hurd/hurd_types.h | 2 +- hurd/shared.h | 18 +++++++++--------- libdiskfs/diskfs.h | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h index bc6b618b..64b46d15 100644 --- a/hurd/hurd_types.h +++ b/hurd/hurd_types.h @@ -199,7 +199,7 @@ enum term_bottom_type The vectors returned by file_get_storage_info encode each of the above (note that the first int is always the storage type). There are four: - ports, ints, offsets (off_t), and data (char); each type of store uses the + ports, ints, offsets (loff_t), and data (char); each type of store uses the following entries in each vector: -type- -ports- -ints- -offsets- -data- -kids- diff --git a/hurd/shared.h b/hurd/shared.h index 25747eb9..1a9304a7 100644 --- a/hurd/shared.h +++ b/hurd/shared.h @@ -64,7 +64,7 @@ struct shared_io int use_file_size; /* file_size is meaningful */ int use_read_size; /* read_size is meaningful */ - off_t read_size; + loff_t read_size; blksize_t optimal_transfer_size; /* users should try to have the arguments to io_prenotify, etc. be @@ -97,10 +97,10 @@ struct shared_io int use_postnotify_size; /* postnotify_size is meaningful */ int use_readnotify_size; /* readnotify_size is meaningful */ - off_t prenotify_size; - off_t postnotify_size; - off_t readnotify_size; - + loff_t prenotify_size; + loff_t postnotify_size; + loff_t readnotify_size; + /* These are set by both the IO server and the user: */ @@ -110,11 +110,11 @@ struct shared_io rd_file_pointer for read and the wr_file_pointer for write. Normally in this case the seekable value will be false. The unused file pointers will be set to -1 by the I/O server. */ - off_t rd_file_pointer; - off_t wr_file_pointer; - off_t xx_file_pointer; + loff_t rd_file_pointer; + loff_t wr_file_pointer; + loff_t xx_file_pointer; - off_t file_size; + loff_t file_size; /* These two indicate that the appropriate times need updated */ int written; diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h index f04b163a..4fdeaac2 100644 --- a/libdiskfs/diskfs.h +++ b/libdiskfs/diskfs.h @@ -57,7 +57,7 @@ struct protid /* One of these is created for each node opened by dir_lookup. */ struct peropen { - off_t filepointer; + loff_t filepointer; int lock_status; refcount_t refcnt; int openstat; @@ -620,7 +620,7 @@ void diskfs_user_try_dropping_softrefs (struct node *np); /* Lookup node INUM (which must have a reference already) and return it without allocating any new references. */ -struct node *diskfs_cached_ifind (ino_t inum); +struct node *diskfs_cached_ifind (ino64_t inum); /* The library exports the following functions for general use */ @@ -859,7 +859,7 @@ error_t diskfs_cached_lookup (ino64_t cache_id, struct node **npp); /* Return the node corresponding to CACHE_ID in *NPP. In case of a cache miss, use CTX to create it and load it from the disk. See the section `Node cache' above. */ -error_t diskfs_cached_lookup_context (ino_t inum, struct node **npp, +error_t diskfs_cached_lookup_context (ino64_t inum, struct node **npp, struct lookup_context *ctx); -- cgit v1.2.3