From 382057f588fbf2c2f7950b85dd317721b8d04c07 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 21 Nov 2016 16:47:23 -0600 Subject: Have dirtree_notdotdot() pass through !node->parent so . and .. on the command line aren't filtered out. Audited all the callers and removed redundant calls, adjusted call sequence, etc. (And let rm _not_ do this, because posix.) --- toys/other/lsusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other/lsusb.c') diff --git a/toys/other/lsusb.c b/toys/other/lsusb.c index 07886e8c..031dbd93 100644 --- a/toys/other/lsusb.c +++ b/toys/other/lsusb.c @@ -24,7 +24,7 @@ static int list_device(struct dirtree *new) if (!new->parent) return DIRTREE_RECURSE; if (new->name[0] == '.') return 0; name = dirtree_path(new, 0); - snprintf(toybuf, sizeof(toybuf), "%s/%s", name, "/uevent"); + sprintf(toybuf, "%s/uevent", name); file = fopen(toybuf, "r"); if (file) { int count = 0; -- cgit v1.2.3