Changeset View
Changeset View
Standalone View
Standalone View
stand/common/commands.c
Show First 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | if (desc != NULL) { | ||||
do { | do { | ||||
pager_output(" "); | pager_output(" "); | ||||
} while (i++ < 30); | } while (i++ < 30); | ||||
pager_output(desc); | pager_output(desc); | ||||
} | } | ||||
return (pager_output("\n")); | return (pager_output("\n")); | ||||
} | } | ||||
static int | static int | ||||
command_help(int argc, char *argv[]) | command_help(int argc, char *argv[]) | ||||
{ | { | ||||
char buf[81]; /* XXX buffer size? */ | char buf[81]; /* XXX buffer size? */ | ||||
int hfd, matched, doindex; | int hfd, matched, doindex; | ||||
char *topic, *subtopic, *t, *s, *d; | char *topic, *subtopic, *t, *s, *d; | ||||
/* page the help text from our load path */ | /* page the help text from our load path */ | ||||
snprintf(buf, sizeof(buf), "%s/boot/loader.help", getenv("loaddev")); | snprintf(buf, sizeof(buf), "%s/boot/%s", getenv("loaddev"), | ||||
HELP_FILENAME); | |||||
if ((hfd = open(buf, O_RDONLY)) < 0) { | if ((hfd = open(buf, O_RDONLY)) < 0) { | ||||
printf("Verbose help not available, " | printf("Verbose help not available, " | ||||
"use '?' to list commands\n"); | "use '?' to list commands\n"); | ||||
return (CMD_OK); | return (CMD_OK); | ||||
} | } | ||||
/* pick up request from arguments */ | /* pick up request from arguments */ | ||||
topic = subtopic = NULL; | topic = subtopic = NULL; | ||||
▲ Show 20 Lines • Show All 444 Lines • Show Last 20 Lines |