[patch 7/8] cio: Dont print trailing \0 in modalias_show().

Martin Schwidefsky
2007-07-17T12:17:54Z

[-- Attachment #1: 006-cio-modalias.diff --]
[-- Type: text/plain, Size: 792 bytes --]

From: Cornelia Huck <cornelia.huck@de.ibm.com>

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
---

drivers/s390/cio/device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: quilt-2.6/drivers/s390/cio/device.c
===================================================================
--- quilt-2.6.orig/drivers/s390/cio/device.c
+++ quilt-2.6/drivers/s390/cio/device.c
@@ -272,7 +272,7 @@ modalias_show (struct device *dev, struc
struct ccw_device_id *id = &(cdev->id);
int len;

- len = snprint_alias(buf, PAGE_SIZE, id, "\n") + 1;
+ len = snprint_alias(buf, PAGE_SIZE, id, "\n");

return len > PAGE_SIZE ? PAGE_SIZE : len;
}