}
}
+static const char *
+nis_objtype (const zotypes type)
+{
+ switch (type)
+ {
+ case NIS_BOGUS_OBJ:
+ return _("BOGUS OBJECT");
+ case NIS_NO_OBJ:
+ return _("NO OBJECT");
+ case NIS_DIRECTORY_OBJ:
+ return _("DIRECTORY");
+ case NIS_GROUP_OBJ:
+ return _("GROUP");
+ case NIS_TABLE_OBJ:
+ return _("TABLE");
+ case NIS_ENTRY_OBJ:
+ return _("ENTRY");
+ case NIS_LINK_OBJ:
+ return _("LINK");
+ case NIS_PRIVATE_OBJ:
+ return _("PRIVATE\n");
+ default:
+ return _("(Unknown object");
+ }
+}
+
static void
print_ttl (const uint32_t ttl)
{
static void
nis_print_objtype (enum zotypes type)
{
- switch (type)
- {
- case NIS_BOGUS_OBJ:
- fputs (_("BOGUS OBJECT\n"), stdout);
- break;
- case NIS_NO_OBJ:
- fputs (_("NO OBJECT\n"), stdout);
- break;
- case NIS_DIRECTORY_OBJ:
- fputs (_("DIRECTORY\n"), stdout);
- break;
- case NIS_GROUP_OBJ:
- fputs (_("GROUP\n"), stdout);
- break;
- case NIS_TABLE_OBJ:
- fputs (_("TABLE\n"), stdout);
- break;
- case NIS_ENTRY_OBJ:
- fputs (_("ENTRY\n"), stdout);
- break;
- case NIS_LINK_OBJ:
- fputs (_("LINK\n"), stdout);
- break;
- case NIS_PRIVATE_OBJ:
- fputs (_("PRIVATE\n"), stdout);
- break;
- default:
- fputs (_("(Unknown object)\n"), stdout);
- break;
- }
+ printf ("%s\n", nis_objtype (type));
}
void
for (i = 0; i < dir->do_armask.do_armask_len; i++)
{
nis_print_rights (ptr->oa_rights);
- printf (_("\tType : %s\n"), nis_nstype2str (ptr->oa_otype));
+ printf (_("\tType : %s\n"), nis_objtype (ptr->oa_otype));
fputs (_("\tAccess rights: "), stdout);
nis_print_rights (ptr->oa_rights);
fputs ("\n", stdout);