#define PSF_SEPARATOR 0xFFFF
static const char loadfont_usage[] = "loadfont\n"
- "\n" "\tLoad a console font from standard input.\n" "\n";
+#ifndef BB_FEATURE_TRIVIAL_HELP
+ "Loads a console font from standard input.\n"
+#endif
+ ;
struct psf_header {
unsigned char magic1, magic2; /* Magic number */
{
int fd;
+ if (argc>=2 && *argv[1]=='-') {
+ usage(loadfont_usage);
+ }
+
fd = open("/dev/tty0", O_RDWR);
if (fd < 0) {
fprintf(stderr, "Error opening /dev/tty0: %s\n", strerror(errno));
- return 1;
+ return( FALSE);
}
loadnewfont(fd);
- return 0;
+ return( TRUE);
}
static void do_loadfont(int fd, char *inbuf, int unit, int fontsize)