fputs (type, stdout);
}
-static void
-print_human_fstype (struct statfs const *statfsbuf)
+static char *
+human_fstype (struct statfs const *statfsbuf)
{
char const *type;
}
if (type)
- fputs (type, stdout);
- else
- printf ("UNKNOWN (0x%x)\n", statfsbuf->f_type);
+ return (char *) type;
+
+ {
+ static char buf[sizeof "UNKNOWN (0x%x)" - 2
+ + 2 * sizeof (statfsbuf->f_type)];
+ sprintf (buf, "UNKNOWN (0x%x)", statfsbuf->f_type);
+ return buf;
+ }
}
static void
printf (pformat, (long int) (statfsbuf->f_type));
break;
case 'T':
-/* print_human_fstype(statfsbuf, pformat);*/
- print_human_fstype (statfsbuf);
+ strcat (pformat, "s");
+ printf (pformat, human_fstype (statfsbuf));
break;
case 'b':
strcat (pformat, PRIdMAX);