Skip to contentSkip to conversation

fix wrong sysfs file attribute

PATCH In review Shaohua Li 2 participants 2 messages Oct 9, 2008

Subsystems (2)
lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

PATCH 1/1 fix wrong sysfs file attribute

This attribute just has write operation.

---
 drivers/base/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/base/memory.c +1 -1
Index: linux/drivers/base/memory.c
===================================================================
@@ -325,7 +325,7 @@ memory_probe_store(struct class *class, 
 
 	return count;
 }
-static CLASS_ATTR(probe, 0700, NULL, memory_probe_store);
+static CLASS_ATTR(probe, 0200, NULL, memory_probe_store);
 
 static int memory_probe_init(void)
 {
#1 lore raw
Quoted 12 lines · On Thu, 09 Oct 2008 13:31:22 +0800 Shaohua Li wrote:

This attribute just has write operation.

---
 drivers/base/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux/drivers/base/memory.c
===================================================================

drivers/base/memory.c memory_probe_store(struct class *class, · line 331

Quoted 8 lines
drivers/base/memory.c +1 -1
@@ -325,7 +325,7 @@ memory_probe_store(struct class *class, 
 
 	return count;
 }
-static CLASS_ATTR(probe, 0700, NULL, memory_probe_store);
+static CLASS_ATTR(probe, 0200, NULL, memory_probe_store);
 
 static int memory_probe_init(void)
 {

#include <stat.h>

+static CLASS_ATTR(probe, S_IWUSR, NULL, memory_probe_store);

is almost readable.

---
~Randy