blkid: new applet. We almost had everything needed for it already

function                                             old     new   delta
display_uuid_cache                                     -      89     +89
blkid_main                                             -       8      +8
applet_names                                        1871    1877      +6
applet_main                                         1140    1144      +4
applet_nameofs                                       570     572      +2
packed_usage                                       24737   24735      -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/1 up/down: 109/-2)            Total: 107 bytes
This commit is contained in:
Denis Vlasenko
2008-10-12 11:20:08 +00:00
parent d5e305944a
commit 1e19afd38a
7 changed files with 37 additions and 20 deletions

View File

@ -6,6 +6,7 @@
lib-y:=
lib-$(CONFIG_BLKID) += get_devname.o
lib-$(CONFIG_FINDFS) += get_devname.o
lib-$(CONFIG_FEATURE_MOUNT_LABEL) += get_devname.o

View File

@ -374,24 +374,25 @@ get_spec_by_volume_label(const char *s, int *major, int *minor)
{
return get_spec_by_x(VOL, s, major, minor);
}
static int display_uuid_cache(void)
{
struct uuidCache_s *u;
size_t i;
uuidcache_init();
u = uuidCache;
while (u) {
printf("%s %s %s\n", u->device, u->label, u->uc_uuid);
u = u->next;
}
return 0;
}
#endif // UNUSED
/* Used by blkid */
void display_uuid_cache(void)
{
struct uuidCache_s *u;
uuidcache_init();
u = uuidCache;
while (u) {
printf("%s:", u->device);
if (u->label[0])
printf(" LABEL=\"%s\"", u->label);
if (u->uc_uuid[0])
printf(" UUID=\"%s\"", u->uc_uuid);
bb_putchar('\n');
u = u->next;
}
}
/* Used by mount and findfs */