[PATCH 3/6] android: fix 'ionice', add ioprio defines

Rich Felker dalias at aerifal.cx
Mon May 28 23:33:10 UTC 2012


On Mon, May 28, 2012 at 11:44:31PM +0200, Tias Guns wrote:
> patch inspired by 'BusyBox Patch V1.0 (Vitaly Greck)'
> https://code.google.com/p/busybox-android/downloads/detail?name=patch_busybox
> 
> Signed-off-by: Tias Guns <tias at ulyssis.org>
> ---
>  include/platform.h |    2 ++
>  miscutils/ionice.c |    4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/include/platform.h b/include/platform.h
> index f250624..ba534b2 100644
> --- a/include/platform.h
> +++ b/include/platform.h
> @@ -336,6 +336,8 @@ typedef unsigned smalluint;
>  
>  #if defined(ANDROID) || defined(__ANDROID__)
>  # define BB_ADDITIONAL_PATH ":/system/sbin:/system/bin:/system/xbin"
> +# define SYS_ioprio_set __NR_ioprio_set
> +# define SYS_ioprio_get __NR_ioprio_get
>  #endif
> [...]
>  static int ioprio_set(int which, int who, int ioprio)
>  {
> -	return syscall(SYS_ioprio_set, which, who, ioprio);
> +	return syscall(__NR_ioprio_set, which, who, ioprio);
>  }

Why are you both adding the SYS_ version of the syscall id, then also
changing the source not to use it? Either one change or the other
would make it work (and I'm not sure which is better) but there's
certainly no need for both...

Rich


More information about the busybox mailing list