From: Linus Torvalds Date: Fri, 9 Apr 2010 17:05:33 +0000 (-0700) Subject: Revert "memory-hotplug: add 0x prefix to HEX block_size_bytes" X-Git-Tag: v2.6.34-rc4~16 X-Git-Url: https://bbs.cooldavid.org/git/?a=commitdiff_plain;h=4dc86ae1f925b2121d4e75058675895f83e54c71;p=net-next-2.6.git Revert "memory-hotplug: add 0x prefix to HEX block_size_bytes" This reverts commit ba168fc37dea145deeb8fa9e7e71c748d2e00d74. It changes user-visible sysfs interfaces, and breaks some existing user space applications which apparently rely on the fact that the output does not contain the "0x" prefix. Requested-by: Heiko Carstens Acked-by: KOSAKI Motohiro Acked-by: Wu Fengguang Signed-off-by: Linus Torvalds --- diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 4f4aa5897b4..933442f4032 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -313,7 +313,7 @@ static ssize_t print_block_size(struct sysdev_class *class, struct sysdev_class_attribute *attr, char *buf) { - return sprintf(buf, "%#lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); + return sprintf(buf, "%lx\n", (unsigned long)PAGES_PER_SECTION * PAGE_SIZE); } static SYSDEV_CLASS_ATTR(block_size_bytes, 0444, print_block_size, NULL);