X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc64%2Fkernel%2Fnvram.c;h=49ddf5e0926bc8c811ec1323c663392762a4b463;hb=3ec04f3d2903fdf6d9849a8633af59b8628164a5;hp=f3644ad5d1805120f3261f8c4c3ff89c9429bb5f;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c index f3644ad5d..49ddf5e09 100644 --- a/arch/ppc64/kernel/nvram.c +++ b/arch/ppc64/kernel/nvram.c @@ -43,9 +43,9 @@ static struct nvram_partition * nvram_part; static long nvram_error_log_index = -1; static long nvram_error_log_size = 0; -int no_logging = 1; /* Until we initialize everything, - * make sure we don't try logging - * anything */ +volatile int no_more_logging = 1; /* Until we initialize everything, + * make sure we don't try logging + * anything */ extern volatile int error_log_cnt; @@ -77,7 +77,7 @@ static loff_t dev_nvram_llseek(struct file *file, loff_t offset, int origin) } -static ssize_t dev_nvram_read(struct file *file, char __user *buf, +static ssize_t dev_nvram_read(struct file *file, char *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -117,7 +117,7 @@ static ssize_t dev_nvram_read(struct file *file, char __user *buf, } -static ssize_t dev_nvram_write(struct file *file, const char __user *buf, +static ssize_t dev_nvram_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { ssize_t len; @@ -640,7 +640,7 @@ int nvram_write_error_log(char * buff, int length, unsigned int err_type) loff_t tmp_index; struct err_log_info info; - if (no_logging) { + if (no_more_logging) { return -EPERM; } @@ -711,7 +711,7 @@ int nvram_read_error_log(char * buff, int length, unsigned int * err_type) /* This doesn't actually zero anything, but it sets the event_logged * word to tell that this event is safely in syslog. */ -int nvram_clear_error_log(void) +int nvram_clear_error_log() { loff_t tmp_index; int clear_word = ERR_FLAG_ALREADY_LOGGED;