[systemd-devel] [PATCH] systemd-journald: fix endianess bug

Lennart Poettering lennart at poettering.net
Wed Feb 29 05:07:21 PST 2012


On Wed, 29.02.12 12:45, Dirk Eibach (eibach at gdsys.de) wrote:

Thanks, applied!

> ---
>  src/journal/journal-file.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
> index 20ca3f6..275caea 100644
> --- a/src/journal/journal-file.c
> +++ b/src/journal/journal-file.c
> @@ -238,7 +238,7 @@ static int journal_file_allocate(JournalFile *f, uint64_t offset, uint64_t size)
>          if (fstat(f->fd, &f->last_stat) < 0)
>                  return -errno;
>  
> -        f->header->arena_size = new_size - htole64(f->header->arena_offset);
> +        f->header->arena_size = htole64(new_size - le64toh(f->header->arena_offset));
>  
>          return 0;
>  }


Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list