[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 6/9] ext2fs: use correct type for disk offsets
From: |
Samuel Thibault |
Subject: |
Re: [PATCH 6/9] ext2fs: use correct type for disk offsets |
Date: |
Fri, 6 Jun 2014 17:32:00 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Justus Winter, le Fri 06 Jun 2014 16:42:15 +0200, a écrit :
> * ext2fs/dir.c (count_dirents): Use off_t for nb.
> (diskfs_get_directs): Likewise for blkno, nblks.
Well, it's not actually an offset, but a block number, so it would
probably be a block_t actually?
> ---
> ext2fs/dir.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/ext2fs/dir.c b/ext2fs/dir.c
> index a7eeaaa..0597500 100644
> --- a/ext2fs/dir.c
> +++ b/ext2fs/dir.c
> @@ -823,7 +823,7 @@ diskfs_drop_dirstat (struct node *dp, struct dirstat *ds)
> write the answer down in its dirents array. As a side affect
> fill BUF with the block. */
> static error_t
> -count_dirents (struct node *dp, int nb, char *buf)
> +count_dirents (struct node *dp, off_t nb, char *buf)
> {
> size_t amt;
> char *offinblk;
> @@ -868,8 +868,8 @@ diskfs_get_directs (struct node *dp,
> vm_size_t bufsiz,
> int *amt)
> {
> - int blkno;
> - int nblks;
> + off_t blkno;
> + off_t nblks;
> int curentry;
> char buf[DIRBLKSIZ];
> char *bufp;
> --
> 2.0.0.rc2
>
--
Samuel
As usual, this being a 1.3.x release, I haven't even compiled this
kernel yet. So if it works, you should be doubly impressed.
(Linus Torvalds, announcing kernel 1.3.3 on the linux-kernel mailing list.)
- [PATCH 1/9] include: use unsigned literal in combination with binary not, Justus Winter, 2014/06/06
- [PATCH 4/9] libdiskfs: avoid implicit integer conversion, Justus Winter, 2014/06/06
- [PATCH 2/9] hurd: fix type of optimal_transfer_size, Justus Winter, 2014/06/06
- [PATCH 5/9] ext2fs: fix compiler warning, Justus Winter, 2014/06/06
- [PATCH 6/9] ext2fs: use correct type for disk offsets, Justus Winter, 2014/06/06
- Re: [PATCH 6/9] ext2fs: use correct type for disk offsets,
Samuel Thibault <=
- [PATCH 8/9] ext2fs: fix type of blockaddr, Justus Winter, 2014/06/06
- [PATCH 7/9] ext2fs: use size_t where appropriate, Justus Winter, 2014/06/06
- [PATCH 3/9] libdiskfs: use correct type for disk offsets, Justus Winter, 2014/06/06
- [PATCH 9/9] ext2fs: fix type of retry_dotdot, Justus Winter, 2014/06/06
- Re: [PATCH 1/9] include: use unsigned literal in combination with binary not, Samuel Thibault, 2014/06/06