Subversion Repositories HelenOS

Rev

Rev 3276 | Rev 3284 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3276 Rev 3283
Line 169... Line 169...
169
/* Dispays help for ${CMDNAME} in various levels */
169
/* Dispays help for ${CMDNAME} in various levels */
170
void * ${HELPENTRY}(unsigned int level)
170
void * ${HELPENTRY}(unsigned int level)
171
{
171
{
172
	printf("This is the %s help for '%s'.\n",
172
	printf("This is the %s help for '%s'.\n",
173
		level ? EXT_HELP : SHORT_HELP, cmdname);
173
		level ? EXT_HELP : SHORT_HELP, cmdname);
174
	return 0;
174
	return CMD_VOID;
175
}
175
}
176
 
176
 
177
EOF
177
EOF
178
	[ "${CMDTYPE}" = "module" ] && cat << EOF >> ${OUTDIR}/${CMDNAME}.c
178
	[ "${CMDTYPE}" = "module" ] && cat << EOF >> ${OUTDIR}/${CMDNAME}.c
179
/* Main entry point for ${CMDNAME}, accepts an array of arguments */
179
/* Main entry point for ${CMDNAME}, accepts an array of arguments */
Line 195... Line 195...
195
	printf("%s %s\n", TEST_ANNOUNCE, cmdname);
195
	printf("%s %s\n", TEST_ANNOUNCE, cmdname);
196
	printf("%d arguments passed to %s", argc - 1, cmdname);
196
	printf("%d arguments passed to %s", argc - 1, cmdname);
197
 
197
 
198
	if (argc < 2) {
198
	if (argc < 2) {
199
		printf("\n");
199
		printf("\n");
200
		return 0;
200
		return CMD_SUCCESS;
201
	}
201
	}
202
 
202
 
203
	printf(":\n");
203
	printf(":\n");
204
	for (i = 1; i < argc; i++)
204
	for (i = 1; i < argc; i++)
205
		printf("[%d] -> %s\n", i, argv[i]);
205
		printf("[%d] -> %s\n", i, argv[i]);
206
 
206
 
207
	return 0;
207
	return CMD_SUCCESS;
208
}
208
}
209
 
209
 
210
EOF
210
EOF
211
	printf "Done.\n\nYou should now modify %ss/%ss.h and ../Makefile" \
211
	printf "Done.\n\nYou should now modify %ss/%ss.h and ../Makefile" \
212
		"${CMDTYPE}" "${CMDTYPE}"
212
		"${CMDTYPE}" "${CMDTYPE}"