On Friday 03 January 2014 05:39:59 zenglg.jy wrote:
> Create fallocate.h to encapsulate fallocate(2)
> 
> Signed-off-by: Zeng Linggang <[email protected]>
> ---
>  testcases/kernel/syscalls/fallocate/fallocate.h   | 46
> +++++++++++++++++++++++ testcases/kernel/syscalls/fallocate/fallocate01.c
> | 23 +----------- testcases/kernel/syscalls/fallocate/fallocate02.c | 19
> +--------- testcases/kernel/syscalls/fallocate/fallocate03.c | 19
> +--------- 4 files changed, 49 insertions(+), 58 deletions(-)
>  create mode 100644 testcases/kernel/syscalls/fallocate/fallocate.h
> 
> diff --git a/testcases/kernel/syscalls/fallocate/fallocate.h
> b/testcases/kernel/syscalls/fallocate/fallocate.h new file mode 100644
> index 0000000..a3cb548
> --- /dev/null
> +++ b/testcases/kernel/syscalls/fallocate/fallocate.h
> @@ -0,0 +1,46 @@
> +/*
> + * Copyright (c) International Business Machines  Corp., 2007
> + * Copyright (c) 2013 Fujitsu Ltd.
> + *
> + * This program is free software;  you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License, or
> + * (at your option) any later version.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU Library General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
> USA. + *
> + */
> +
> +#ifndef FALLOCATE_H
> +#define FALLOCATE_H
> +
> +#include <sys/types.h>
> +#include <endian.h>
> +#include "linux_syscall_numbers.h"
> +
> +static inline long fallocate(int fd, int mode, loff_t offset, loff_t len)
> +{
> +/* deal with MIPS n32 and x86_64 x32 */

indent, and just have it say:
        /* Deal with 32bit ABIs that have 64bit syscalls.  */

> +#if defined(__mips__) && _MIPS_SIM == _ABIN32 || \
> +defined(__x86_64__) && defined(__ILP32__)

pretty sure you need more paren there.  and indentation.

#if (defined(__mips__) && _MIPS_SIM == _ABIN32) || \
     (defined(__x86_64__) && defined(__ILP32__)) || \
     __WORDSIZE == 64
        return ltp_syscall(__NR_fallocate, fd, mode, offset, len);
#else
        ... do 32bit version here ...
#endif

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to