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;
}
-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;
}
-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;
loff_t tmp_index;
struct err_log_info info;
- if (no_logging) {
+ if (no_more_logging) {
return -EPERM;
}
/* 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;