Beispiel #1
0
void
options(int argc, char **argv)
{

	/*
	 * Are we acting like pax, tar or cpio (based on argv[0])
	 */
	if ((argv0 = strrchr(argv[0], '/')) != NULL)
		argv0++;
	else
		argv0 = argv[0];

	if (strcmp(NM_TAR, argv0) == 0) {
		tar_options(argc, argv);
		return;
	}
#ifndef NOCPIO
	else if (strcmp(NM_CPIO, argv0) == 0) {
		cpio_options(argc, argv);
		return;
	}
#endif /* !NOCPIO */
	/*
	 * assume pax as the default
	 */
	argv0 = NM_PAX;
	pax_options(argc, argv);
}
Beispiel #2
0
void
options(int argc, char **argv)
{
	extern char *__progname;

	/*
	 * Are we acting like pax, tar or cpio (based on argv[0])
	 */
	argv0 = __progname;

	if (strcmp(NM_TAR, argv0) == 0) {
		tar_options(argc, argv);
		return;
	}
#ifndef NOCPIO
	else if (strcmp(NM_CPIO, argv0) == 0) {
		cpio_options(argc, argv);
		return;
	}
#endif /* !NOCPIO */
	/*
	 * assume pax as the default
	 */
	argv0 = NM_PAX;
	pax_options(argc, argv);
}
Beispiel #3
0
void
options(int argc, char **argv)
{

	/*
	 * Are we acting like pax, tar or cpio (based on argv[0])
	 */
	if ((argv0 = strrchr(argv[0], '/')) != NULL)
		argv0++;
	else
		argv0 = argv[0];

	if (strstr(argv0, NM_TAR)) {
		argv0 = NM_TAR;
		tar_options(argc, argv);
#ifndef NO_CPIO
	} else if (strstr(argv0, NM_CPIO)) {
		argv0 = NM_CPIO;
		cpio_options(argc, argv);
#endif
	} else {
		argv0 = NM_PAX;
		pax_options(argc, argv);
	}
}
Beispiel #4
0
void
options(int argc, char **argv)
{

	/*
	 * Are we acting like pax, tar or cpio (based on argv[0])
	 */
	if ((argv0 = strrchr(argv[0], '/')) != NULL)
		argv0++;
	else
		argv0 = argv[0];

	if (strcmp(NM_TAR, argv0) == 0)
		return(tar_options(argc, argv));
	else if (strcmp(NM_CPIO, argv0) == 0)
		return(cpio_options(argc, argv));
	/*
	 * assume pax as the default
	 */
	argv0 = NM_PAX;
	return(pax_options(argc, argv));
}