MFC: sys/geom/label/g_label.c 1.17

Back-out the change from revision 1.14 and allow for '/' in labels again.

Convinced by:	green, Gavin Atkinson, dougb, gordon
Approved by:	re (scottl)
This commit is contained in:
pjd 2005-08-30 15:16:14 +00:00
parent ba6b9383b3
commit dae84097da

View File

@ -263,20 +263,12 @@ g_label_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
} while (0);
for (i = 0; g_labels[i] != NULL; i++) {
char label[64];
char *p;
g_topology_unlock();
g_labels[i]->ld_taste(cp, label, sizeof(label));
g_topology_lock();
if (label[0] == '\0')
continue;
/*
* Don't allow / in labels.
*/
for (p = label; *p != '\0'; p++) {
if (*p == '/')
*p = '_';
}
g_label_create(NULL, mp, pp, label, g_labels[i]->ld_dir,
pp->mediasize);
}