merging fadvise64_64 fallback?

Andreas Jaeger aj@suse.com
Tue Dec 4 08:18:00 GMT 2012


On 12/04/2012 08:15 AM, Mike Frysinger wrote:
> this patch still applies :)
> http://sourceware.org/ml/libc-alpha/2004-09/msg00179.html
> -mike

That one contains "Before I test", so did anybody test this ?

I suggest to rework the patch:
* add a copyright header change
* have the common parts merged together (see below)

Andreas

> --- a/sysdeps/unix/sysv/linux/posix_fadvise.c
> +++ b/sysdeps/unix/sysv/linux/posix_fadvise.c
> @@ -35,6 +35,19 @@
>       return INTERNAL_SYSCALL_ERRNO (ret, err);
>     return 0;
>   #else
> +# ifdef __NR_fadvise64_64
> +  INTERNAL_SYSCALL_DECL (err);
> +  int ret = INTERNAL_SYSCALL (fadvise64_64, err, 6, fd,
> +			      __LONG_LONG_PAIR ((long) (offset >> 31),
> +						(long) offset),
> +			      __LONG_LONG_PAIR ((long) (len >> 31),
> +						(long) len),
> +			      advise);

The following lines are duplicated now in the file, could change the 
condition to have them only once?

> +  if (INTERNAL_SYSCALL_ERROR_P (ret, err))
> +    return INTERNAL_SYSCALL_ERRNO (ret, err);
> +  return 0;
> +# else
>     return ENOSYS;
> +# endif
>   #endif
>   }
>


-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list