コード例 #1
0
ファイル: raidctl.c プロジェクト: ajinkya93/netbsd-src
static void
rf_configure(int fd, char *config_file, int force)
{
	void *generic;
	RF_Config_t cfg;

	if (rf_MakeConfig( config_file, &cfg ) != 0)
		err(1, "Unable to create RAIDframe configuration structure");
	
	cfg.force = force;

	/* 
	 * Note the extra level of redirection needed here, since
	 * what we really want to pass in is a pointer to the pointer to 
	 * the configuration structure. 
	 */

	generic = &cfg;
	do_ioctl(fd, RAIDFRAME_CONFIGURE, &generic, "RAIDFRAME_CONFIGURE");
}
コード例 #2
0
ファイル: raidctl.c プロジェクト: lacombar/netbsd-alc
static void
rf_configure(int fd, char *config_file, int force)
{
	void *generic;
	RF_Config_t cfg;

	if (rf_MakeConfig( config_file, &cfg ) != 0) {
		fprintf(stderr,"%s: unable to create RAIDframe %s\n",
			getprogname(), "configuration structure\n");
		exit(1);
	}
	
	cfg.force = force;

	/* 
	 * Note the extra level of redirection needed here, since
	 * what we really want to pass in is a pointer to the pointer to 
	 * the configuration structure. 
	 */

	generic = (void *) &cfg;
	do_ioctl(fd, RAIDFRAME_CONFIGURE, &generic, "RAIDFRAME_CONFIGURE");
}