From 4f4e81d1e7a21dc4c01c39b02e48e3e860102dc9 Mon Sep 17 00:00:00 2001 From: Zhang Yanfei Date: Thu, 28 Mar 2013 16:15:35 +0800 Subject: [PATCH] --- yaml --- r: 363243 b: refs/heads/master c: eca4549f57a19f8881dcd7b9cef719b3452003c0 h: refs/heads/master i: 363241: 65fb8c19b29a9ad77f38946897742a8865953040 363239: 0e2a2de8f12b472e4e484cc39b2a2ca284938040 v: v3 --- [refs] | 2 +- trunk/drivers/base/cpu.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ea01f239ecc6..5b00a2a9c2f3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6ae07f27ab202069bd567967a0099070eb7f77d5 +refs/heads/master: eca4549f57a19f8881dcd7b9cef719b3452003c0 diff --git a/trunk/drivers/base/cpu.c b/trunk/drivers/base/cpu.c index fb10728f6372..a55b5909176f 100644 --- a/trunk/drivers/base/cpu.c +++ b/trunk/drivers/base/cpu.c @@ -132,6 +132,17 @@ static ssize_t show_crash_notes(struct device *dev, struct device_attribute *att return rc; } static DEVICE_ATTR(crash_notes, 0400, show_crash_notes, NULL); + +static ssize_t show_crash_notes_size(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + ssize_t rc; + + rc = sprintf(buf, "%lu\n", sizeof(note_buf_t)); + return rc; +} +static DEVICE_ATTR(crash_notes_size, 0400, show_crash_notes_size, NULL); #endif /* @@ -259,6 +270,9 @@ int __cpuinit register_cpu(struct cpu *cpu, int num) #ifdef CONFIG_KEXEC if (!error) error = device_create_file(&cpu->dev, &dev_attr_crash_notes); + if (!error) + error = device_create_file(&cpu->dev, + &dev_attr_crash_notes_size); #endif return error; }