예제 #1
0
파일: libmc.c 프로젝트: sp193/ps2sdk
// create a dir
// mcSync returns:	0 if ok
//					< 0 if error
//
// args:	port number
//			slot number
//			directory name
// returns:	0   = successful
//			< 0 = error
int mcMkDir(int port, int slot, const char* name)
{
	int ret = mcOpen(port, slot, name, 0x40);

	if(ret != 0)
		g_currentCmd = MC_FUNC_MK_DIR;
	return ret;
}
예제 #2
0
int McAccess::open(const char *name, int mode) {
	int res;
	WaitSema(_sema);
	mcOpen(_port, _slot, name, mode);
	mcSync(0, NULL, &res);
	SignalSema(_sema);
	return res;
}
예제 #3
0
int mcIO::open(const char *name, int flags)
{
	int rv;

#ifdef AIOMC_DEBUG
//	printf("mcIO open\n");
#endif

	mcOpen(port, 0, name, flags);
	mcSync(MC_WAIT, NULL, &rv);
	return rv;
}