summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-11-18 01:07:21 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:06:24 -0700
commit7408a7fbb5885033d266b4b31c3abeb695820da3 (patch)
tree75242473d236ec502d09811d4e619680ff9e591a
parent98b88dbf704a1376ee4c79051086089adde5d626 (diff)
[PATCH] fix up printf-like functionality due to previous changes.
-rw-r--r--namedev.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/namedev.c b/namedev.c
index f6be43ef51..6444dd0feb 100644
--- a/namedev.c
+++ b/namedev.c
@@ -601,10 +601,6 @@ label_found:
continue;
strcpy(udev->name, dev->name);
- if (isdigit(class_dev->path[strlen(class_dev->path)-1])) {
- temp = &class_dev->path[strlen(class_dev->path)-1];
- strcat(udev->name, temp);
- }
if (dev->mode != 0) {
udev->mode = dev->mode;
strcpy(udev->owner, dev->owner);
@@ -819,7 +815,9 @@ static int get_attr(struct sysfs_class_device *class_dev, struct udevice *udev)
done:
/* substitute placeholder in NAME */
while (1) {
- pos = strchr(udev->name, '%');
+ char *pos = strchr(udev->name, '%');
+ char *dig;
+ char name[NAME_SIZE];
if (pos) {
strcpy(name, pos+2);
*pos = 0x00;