aboutsummaryrefslogtreecommitdiff
path: root/util-linux/volume_id
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-03-31 19:47:34 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-03-31 19:47:34 +0000
commit9983d806d910ef1e01bc1868ded40720cee3f092 (patch)
tree131207a0924d95665e784035c3fc6ee29a199497 /util-linux/volume_id
parentf6fbd62760252f90ce95212f5cc33f8204159410 (diff)
downloadbusybox-9983d806d910ef1e01bc1868ded40720cee3f092.tar.gz
volumeid: fix bug 249 "findfs finds the wrong partition"
Diffstat (limited to 'util-linux/volume_id')
-rw-r--r--util-linux/volume_id/get_devname.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/util-linux/volume_id/get_devname.c b/util-linux/volume_id/get_devname.c
index 45a4aeea9..ac69f78c4 100644
--- a/util-linux/volume_id/get_devname.c
+++ b/util-linux/volume_id/get_devname.c
@@ -223,13 +223,11 @@ void display_uuid_cache(void)
char *get_devname_from_label(const char *spec)
{
struct uuidCache_s *uc;
- int spec_len = strlen(spec);
uuidcache_init();
uc = uuidCache;
while (uc) {
-// FIXME: empty label ("LABEL=") matches anything??!
- if (uc->label[0] && strncmp(spec, uc->label, spec_len) == 0) {
+ if (uc->label[0] && strcmp(spec, uc->label) == 0) {
return xstrdup(uc->device);
}
uc = uc->next;