FreeBSD/sys/geom/sched/g_sched.c
/*
 * Read the i-th argument for a request, skipping the /dev/
 * prefix if present.
 */
Read the i-th argument for a request, skipping the /dev
prefix if present.
Read the i - th argument for a request skipping the / dev prefix if present .
static const char *
g_sched_argi(struct gctl_req *req, int i)
{
	static const char *dev_prefix = "/dev/";
	const char *name;
	char param[16];
	int l = strlen(dev_prefix);
	snprintf(param, sizeof(param), "arg%d", i);
	name = gctl_get_asciiparam(req, param);
	if (name == NULL)
		gctl_error(req, "No 'arg%d' argument", i);
	else if (strncmp(name, dev_prefix, l) == 0)
		name += l;
	return (name);
}
static const char * g_sched_argi ( struct gctl_req * req , int i ) { static const char * dev_prefix = " " ; const char * name ; char param [ 16 ] ; int l = strlen ( dev_prefix ) ; snprintf ( param , sizeof ( param ) , " " , i ) ; name = gctl_get_asciiparam ( req , param ) ; if ( name == NULL ) gctl_error ( req , " " , i ) ; else if ( strncmp ( name , dev_prefix , l ) == 0 ) name += l ; return ( name ) ; }
Read the i-th argument for a request, skipping the /dev
 prefix if present.
Read the i - th argument for a request skipping the / dev prefix if present .