Re: ionice and ioprio_[gs]et

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 03, 2007 at 08:03:26PM -0400, Mike Frysinger wrote:
> +]], [[int test = __NR_$1;]])],v
> +    [sysnum="__NR_$1"],[sysnum=""])
> +    if test "x$sysnum" != "x" ; then
> +      AC_MSG_RESULT([__NR_$1])
> +    else
> +      case $host_cpu in
> +        $2
> +        *) sysnum=-1;;
> +      esac
> +      if test "x$sysnum" = "x-1" ; then
> +        AC_MSG_RESULT([unable to detect])
> +      else
> +        AC_MSG_RESULT([$sysnum])
> +      fi
> +    fi
> +    AC_DEFINE_UNQUOTED([SYS_$1], $sysnum, [Fallback syscall number for $1 in place of __NR_$1])
> +  ])
> +])

It means:

    #define SYS_<foo>    -1

is case the syscall <foo> is unsupported by system during build time.
That's bad. It doesn't make sense to build utils that are completely
useless on arbitrary system.

There should be two choices:

 1) fallback logic (temporary for "newish" syscalls)
    - we build independently on the current kernel/glibc
    - if SYS_<foo> is undefined by system, but we have fallback:
      AC_MSG_WARN([your system does not support SYS_$1, using $sysnum])

 2) AC_CONDITIONAL(HAVE_SYSCALL_$1 ........)


I think we still need things like:

 if HAVE_SCHED_GETAFFINITY
 usrbinexec_PROGRAMS += taskset
 man_MANS += taskset.1
 endif

Your old patch "check for existence of sched_getaffinity" still
makes a lot of sense for archs where this syscall is not implemented.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux