本文整理汇总了C++中do_sys_open函数的典型用法代码示例。如果您正苦于以下问题:C++ do_sys_open函数的具体用法?C++ do_sys_open怎么用?C++ do_sys_open使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了do_sys_open函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SYSCALL_DEFINE3
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
if (force_o_largefile())
flags |= O_LARGEFILE;
return do_sys_open(AT_FDCWD, filename, flags, mode);
}
示例2: __mod_open_fd
//Alternatives...
int __mod_open_fd(const char* filename, int flags, int mode)
{
int fd;
mm_segment_t old_fs = get_fs();
set_fs(KERNEL_DS);
//
fd = do_sys_open(AT_FDCWD, filename, flags, mode);
//
set_fs(old_fs);
return fd;
}
示例3: SYSCALL_DEFINE3
SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
long ret;
if (force_o_largefile())
flags |= O_LARGEFILE;
ret = do_sys_open(AT_FDCWD, filename, flags, mode);
/* avoid REGPARM breakage on x86: */
asmlinkage_protect(3, ret, filename, flags, mode);
return ret;
}
示例4: sys_open
asmlinkage long sys_open(const char __user *filename, int flags, int mode)
{
long ret;
if (force_o_largefile())
flags |= O_LARGEFILE;
ret = do_sys_open(AT_FDCWD, filename, flags, mode);
/* avoid REGPARM breakage on x86: */
prevent_tail_call(ret);
return ret;
}
示例5: sys_openat
asmlinkage long sys_openat(int dfd, const char __user *filename, int flags,
int mode)
{
long ret;
if (force_o_largefile())
flags |= O_LARGEFILE;
ret = do_sys_open(dfd, filename, flags, mode);
/* avoid REGPARM breakage on x86: */
asmlinkage_protect(4, ret, dfd, filename, flags, mode);
return ret;
}
示例6: SYSCALL_DEFINE4
SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,
umode_t, mode)
{
long ret;
if (force_o_largefile())
flags |= O_LARGEFILE;
ret = do_sys_open(dfd, filename, flags, mode);
asmlinkage_protect(4, ret, dfd, filename, flags, mode);
return ret;
}
示例7: sparc32_open
asmlinkage long sparc32_open(const char __user *filename,
int flags, int mode)
{
return do_sys_open(AT_FDCWD, filename, flags, mode);
}
示例8: COMPAT_SYSCALL_DEFINE4
/*
* Exactly like sys_openat(), except that it doesn't set the
* O_LARGEFILE flag.
*/
COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags, umode_t, mode)
{
return do_sys_open(dfd, filename, flags, mode);
}
示例9: COMPAT_SYSCALL_DEFINE3
/*
* Exactly like sys_open(), except that it doesn't set the
* O_LARGEFILE flag.
*/
COMPAT_SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, umode_t, mode)
{
return do_sys_open(AT_FDCWD, filename, flags, mode);
}