Re: [PATCH] v4l-utils: use openat when available

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

 



Hello,

On 1/22/13 5:37 PM, Riku Voipio wrote:
> New architectures such as 64-Bit arm build kernels without legacy
> system calls - Such as the the no-at system calls. Thus, use
> SYS_openat whenever it is available.

> +#ifdef SYS_openat
> +#define SYS_OPEN(file, oflag, mode) \
> +	syscall(SYS_openat, AT_FDCWD, (const char *)(file), (int)(oflag), (mode_t)(mode))
> +#else
>  #define SYS_OPEN(file, oflag, mode) \
>  	syscall(SYS_open, (const char *)(file), (int)(oflag), (mode_t)(mode))
> +#endif

This would reduce compatibility to Linux >= 2.6.16 where openat was
introduced. How about testing for absence of SYS_open instead? Or fall
back to SYS_open if SYS_openat is not implemented?

Thanks,
Gregor

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux