diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-07-27 11:57:44 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2019-07-27 12:04:35 +0200 |
commit | 0d1e89c38f0d99f5bab0c5a52e21d1efd87fbd76 (patch) | |
tree | 93d82fcc6300bdc6d3eaef37be46832b270639ca | |
parent | 524e2fb5a031f1d7bee74abbd270ddbc8e1e334f (diff) | |
download | hurd-0d1e89c38f0d99f5bab0c5a52e21d1efd87fbd76.tar.gz hurd-0d1e89c38f0d99f5bab0c5a52e21d1efd87fbd76.tar.bz2 hurd-0d1e89c38f0d99f5bab0c5a52e21d1efd87fbd76.zip |
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'.
-rw-r--r-- | hurd/hurd_types.h | 2 | ||||
-rw-r--r-- | hurd/shared.h | 18 | ||||
-rw-r--r-- | 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); |