Пример #1
0
int main(int argc, char **argv)
{
	char *outtyp;
	char *outcomp;
	int forcehead;
	int n, err;
        int stdret = standard_args(argc, argv); if (!stdret) return 0;

	if (argc < 2) return help(argc, argv);

        ignore_arg("-itype", 2, &argc, argv);
        ignore_arg("-iside", 2, &argc, argv);
        ignore_arg("-icomp", 2, &argc, argv);
        ignore_arg("-otype", 2, &argc, argv);
        ignore_arg("-oside", 2, &argc, argv);
        ignore_arg("-ocomp", 2, &argc, argv);

	outtyp    = check_type("-type", &argc, argv);
	outcomp   = check_type("-comp", &argc, argv);
	forcehead = check_forcehead("-side", &argc, argv);	
	retries   = check_retry("-retry", &argc, argv);

        if (find_arg("--help",    argc, argv) > 0) return help(argc, argv);
	args_complete(&argc, argv);

	err = 0;
	for (n = 1; n < argc; n++)
	{
		if (do_login(argc, argv[n], outtyp, outcomp, forcehead))
			++err;
	}
	return err;
}
Пример #2
0
int main(int argc, char **argv)
{
	char *outtyp;
	char *outcomp;
	int forcehead;
	int stdret;
	dsk_format_t format;

	if (argc < 2) return help(argc, argv);
        if (find_arg("--help",    argc, argv) > 0) return help(argc, argv);
	stdret = standard_args(argc, argv); if (!stdret) return 0;
        ignore_arg("-itype", 2, &argc, argv);
        ignore_arg("-iside", 2, &argc, argv);
        ignore_arg("-icomp", 2, &argc, argv);
        ignore_arg("-otype", 2, &argc, argv);
        ignore_arg("-oside", 2, &argc, argv);
        ignore_arg("-ocomp", 2, &argc, argv);
        outtyp    = check_type("-type", &argc, argv); if (!outtyp) outtyp = "dsk";
        outcomp   = check_type("-comp", &argc, argv); 
        forcehead = check_forcehead("-side", &argc, argv);
	format    = check_format("-format", &argc, argv);
        retries   = check_retry("-retry", &argc, argv);
	if (format == -1) format = FMT_180K;
	args_complete(&argc, argv);

	return do_format(argv[1], outtyp, outcomp, forcehead, format);
}
Пример #3
0
int main(int argc, char **argv)
{
	char *outtyp;
	char *outcomp;
	int forcehead;
	int n, err;

	if (argc < 2) return help(argc, argv);

        ignore_arg("-itype", 2, &argc, argv);
        ignore_arg("-iside", 2, &argc, argv);
        ignore_arg("-icomp", 2, &argc, argv);
        ignore_arg("-otype", 2, &argc, argv);
        ignore_arg("-oside", 2, &argc, argv);
        ignore_arg("-ocomp", 2, &argc, argv);

	outtyp    = check_type("-type", &argc, argv);
	outcomp   = check_type("-comp", &argc, argv);
	forcehead = check_forcehead("-side", &argc, argv);	
	retries   = check_retry("-retry", &argc, argv);
	format    = check_format("-format", &argc, argv);

        if (find_arg("--help",    argc, argv) > 0) return help(argc, argv);
        if (find_arg("--version", argc, argv) > 0) return version();
        if ((n = find_arg("--pcdos",   argc, argv) > 0)) 
	{
		md = FORCE_PCDOS;
		excise_arg(n, &argc, argv);
	}
        if ((n = find_arg("-pcdos",    argc, argv) > 0))
	{
		md = FORCE_PCDOS;
		excise_arg(n, &argc, argv);
	}
        if ((n = find_arg("--apricot", argc, argv) > 0))
	{
		md = FORCE_APRICOT;
		excise_arg(n, &argc, argv);
	}
        if ((n = find_arg("-apricot",  argc, argv) > 0))
	{
		md = FORCE_APRICOT;
		excise_arg(n, &argc, argv);
	}
	args_complete(&argc, argv);

	err = 0;
	for (n = 1; n < argc; n++)
	{
		if (do_swapboot(argc, argv[n], outtyp, outcomp, forcehead))
			++err;
	}
	return err;
}
Пример #4
0
int main(int argc, char **argv)
{
	char *outtyp;
	char *outcomp;
	int forcehead;
	int np;
        int stdret;

        stdret = standard_args(argc, argv); if (!stdret) return 0;
	if (find_arg("-libdskrc", argc, argv) > 0 ||
	    find_arg("--libdskrc", argc, argv) > 0)
	{
		return dump_libdskrc();
	}

	if (argc < 2) return help(argc, argv);

        ignore_arg("-itype", 2, &argc, argv);
        ignore_arg("-iside", 2, &argc, argv);
        ignore_arg("-icomp", 2, &argc, argv);
        ignore_arg("-otype", 2, &argc, argv);
        ignore_arg("-oside", 2, &argc, argv);
        ignore_arg("-ocomp", 2, &argc, argv);

	outtyp    = check_type("-type", &argc, argv);
	outcomp   = check_type("-comp", &argc, argv);
	forcehead = check_forcehead("-side", &argc, argv);	
	retries   = check_retry("-retry", &argc, argv);

        if (find_arg("--help",    argc, argv) > 0) return help(argc, argv);
	np = find_arg("-80", argc, argv);
	if (np > 0) 
	{
		t80 = 1;
		excise_arg(np, &argc, argv);
	}
	args_complete(&argc, argv);

	if (!outtyp) outtyp = "dsk";
	return do_test(argv[1], outtyp, outcomp, forcehead);
}