#include <stdlib.h>
#include <stdio.h>
#include "bless.h"
#include "enums.h"
#include "structs.h"
void usage() {
fprintf(stderr, "Usage: %s [options]\n", getprogname());
fputs(
"\t--help\t\tThis usage statement\n"
"\n"
"Info Mode:\n"
"\t--info [dir]\tPrint blessing information for a specific volume, or the\n"
"\t\t\tcurrently active boot volume if <dir> is not specified\n"
"\t--getBoot\tSuppress normal output and print the active boot volume\n"
"\t--version\tPrint bless version number\n"
"\t--plist\t\tFor any output type, use a plist representation\n"
"\t--verbose\tVerbose output\n"
"\n"
"Folder Mode:\n"
"\t--folder dir\tSet <dir> as the blessed directory\n"
"\t--bootinfo [file]\tUse <file> to create a \"BootX\" file in the\n"
"\t\t\tblessed dir\n"
"\t--setBoot\tSet OpenFirmware to boot from this volume\n"
"\t--openfolder dir\tSet <dir> to be the visible Finder directory\n"
"\t--verbose\tVerbose output\n"
"\n"
"Mount Mode:\n"
"\t--mount dir\tUse this mountpoint in conjunction with --setBoot\n"
"\t--setBoot\tSet OpenFirmware to boot from this volume\n"
"\t--verbose\tVerbose output\n"
"\n"
"Device Mode:\n"
"\t--device dev\tUse this block device in conjunction with --setBoot\n"
"\t--setBoot\tSet OpenFirmware to boot from this volume\n"
"\t--verbose\tVerbose output\n"
,
stderr);
exit(1);
}
void usage_short() {
fprintf(stderr, "Usage: %s [options]\n", getprogname());
fputs(
"bless --help\n"
"\n"
"bless --folder directory [--bootinfo [file]] [--setBoot]\n"
"\t[--openfolder directory] [--verbose]\n"
"\n"
"bless --mount directory [--setBoot] [--verbose]\n"
"\n"
"bless --device device [--setBoot] [--verbose]\n"
"\n"
"bless --info [directory] [--getBoot] [--plist] [--verbose] [--version]\n"
,
stderr);
exit(1);
}