Re: [PATCH v3 1/2] init: add sys-wrapper.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Namhyung Kim
Date: Tuesday, August 31, 2010 - 7:16 am

On Tue, Aug 31, 2010 at 04:03, Sam Ravnborg <sam@ravnborg.org> wrote:

Hi,
Thanks for your comments.



OK. Then, how about this?
(I added <asm/uaccess.h> and removed <linux/fcntl.h> because I think it is
more appropriate.)

/*
 * wrappers for various syscalls for use in the init code
 *
 * Copyright (C) 2010  Namhyung Kim <namhyung@gmail.com>
 *
 * This file is released under the GPLv2.
 */

#include <linux/syscalls.h>
#include <linux/dirent.h>
#include <linux/types.h>
#include <linux/fs.h>

#include <asm/uaccess.h>



Is this just your preference or general tendency?



No, usual strings are in kernel space but syscall requires its arguments
to be __user pointers so we have to convert __force.



-- 
Regards,
Namhyung Kim
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH v3 0/2] init cleanups, Namhyung Kim, (Mon Aug 30, 10:27 am)
[PATCH v3 1/2] init: add sys-wrapper.h, Namhyung Kim, (Mon Aug 30, 10:27 am)
Re: [PATCH v3 1/2] init: add sys-wrapper.h, Sam Ravnborg, (Mon Aug 30, 12:03 pm)
Re: [PATCH v3 1/2] init: add sys-wrapper.h, Namhyung Kim, (Tue Aug 31, 7:16 am)
Re: [PATCH v3 1/2] init: add sys-wrapper.h, Sam Ravnborg, (Tue Aug 31, 7:30 am)
Re: [PATCH v3 1/2] init: add sys-wrapper.h, Namhyung Kim, (Tue Aug 31, 7:34 am)