Commits

hominem_te_esse committed df47468

just some cosmetics

Comments (0)

Files changed (7)

modules/hdd/ps2hdd/hdd.c

 	hddRead,
 	hddWrite,
 	hddLseek,
-	(void*)fioUnsupported,
+	(void*)hddUnsupported,
 	hddRemove,
-	(void*)fioUnsupported,
-	(void*)fioUnsupported,
+	(void*)hddUnsupported,
+	(void*)hddUnsupported,
 	hddDopen,
 	hddClose,
 	hddDread,
 	hddGetStat,
-	(void*)fioUnsupported,
+	(void*)hddUnsupported,
 	hddReName,
-	(void*)fioUnsupported,
-	(void*)fioUnsupported,
-	(void*)fioUnsupported,
-	(void*)fioUnsupported,
-	(void*)fioUnsupported,
+	(void*)hddUnsupported,
+	(void*)hddUnsupported,
+	(void*)hddUnsupported,
+	(void*)hddUnsupported,
+	(void*)hddUnsupported,
 	hddDevctl,
-	(void*)fioUnsupported,
-	(void*)fioUnsupported,
+	(void*)hddUnsupported,
+	(void*)hddUnsupported,
 	hddIoctl2,
 };
 iop_device_t hddFioDev={

modules/hdd/ps2hdd/hdd_fio.c

 	return rv;
 }
 
-int fioUnsupported(iop_file_t *f){return -1;}
+int hddUnsupported(iop_file_t *f){return -1;}

modules/hdd/ps2hdd/hdd_fio.h

 int hddReName(iop_file_t *f, const char *oldname, const char *newname);
 int hddDevctl(iop_file_t *f, const char *devname, int cmd, void *arg, unsigned int arglen, void *bufp, unsigned int buflen);
 
-int fioUnsupported(iop_file_t *f);
+int hddUnsupported(iop_file_t *f);
 
 #endif /* _HDD_FIO_H */

modules/ps2fs/pfs.c

 	pfsSync,
 	pfsMount,
 	pfsUmount,
-	fioUnsupported /*pfsLseek64*/,
+	pfsLseek64,
 	pfsDevctl,
-	fioUnsupported /*pfsSymlink*/,
-	fioUnsupported /*pfsReadlink*/,
+	pfsUnsupported /*pfsSymlink*/,
+	pfsUnsupported /*pfsReadlink*/,
 	pfsIoctl2
 };
 

modules/ps2fs/pfs_fio.c

 
 s64 pfsLseek64(iop_file_t *f, s64 offset, int whence)
 {
-	pfs_file_slot_t *fileSlot = (pfs_file_slot_t *)f->privdata;
+	printf("ps2fs: Error: Operation currently unsupported.\n");
+
+	return -1;
+
+	/*pfs_file_slot_t *fileSlot = (pfs_file_slot_t *)f->privdata;
 	u64 rv;
 
 	rv=checkFileSlot(fileSlot);
 		rv=_seek(fileSlot, offset, whence, f->mode);
 		SignalSema(pfsFioSema);
 	}
-	return rv;
+	return rv;*/
 }
 
 int _remove(pfs_mount_t *pfsMount, const char *path, int mode)
 	return checkForLastError(pfsMount, rv);
 }
 
-int fioUnsupported()
+int pfsUnsupported()
 {
 	printf("ps2fs: Error: Operation currently unsupported.\n");
 

modules/ps2fs/pfs_fio.h

 ///////////////////////////////////////////////////////////////////////////////
 //   Functions which hook into IOMAN
 
-int	pfsInit(iop_device_t *f);
-int	pfsDeinit(iop_device_t *f);
-int	pfsFormat(iop_file_t *, const char *dev, const char *blockdev, void *arg, size_t arglen);
-int	pfsOpen(iop_file_t *f, const char *name, int flags, int mode);
-int	pfsClose(iop_file_t *f);
-int	pfsRead(iop_file_t *f, void *buf, int size);
-int	pfsWrite(iop_file_t *f, void *buf, int size);
-int	pfsLseek(iop_file_t *f, unsigned long pos, int whence);
-int	pfsRemove(iop_file_t *f, const char *name);
-int	pfsMkdir(iop_file_t *f, const char *path, int mode);
-int	pfsRmdir(iop_file_t *f, const char *path);
-int	pfsDopen(iop_file_t *f, const char *name);
-int	pfsDclose(iop_file_t *f);
-int	pfsDread(iop_file_t *f, iox_dirent_t *buf);
-int	pfsGetstat(iop_file_t *f, const char *name, iox_stat_t *stat);
-int	pfsChstat(iop_file_t *f, const char *name, iox_stat_t *stat, unsigned int statmask);
+int pfsInit(iop_device_t *f);
+int pfsDeinit(iop_device_t *f);
+int pfsFormat(iop_file_t *, const char *dev, const char *blockdev, void *arg, size_t arglen);
+int pfsOpen(iop_file_t *f, const char *name, int flags, int mode);
+int pfsClose(iop_file_t *f);
+int pfsRead(iop_file_t *f, void *buf, int size);
+int pfsWrite(iop_file_t *f, void *buf, int size);
+int pfsLseek(iop_file_t *f, unsigned long pos, int whence);
+int pfsRemove(iop_file_t *f, const char *name);
+int pfsMkdir(iop_file_t *f, const char *path, int mode);
+int pfsRmdir(iop_file_t *f, const char *path);
+int pfsDopen(iop_file_t *f, const char *name);
+int pfsDclose(iop_file_t *f);
+int pfsDread(iop_file_t *f, iox_dirent_t *buf);
+int pfsGetstat(iop_file_t *f, const char *name, iox_stat_t *stat);
+int pfsChstat(iop_file_t *f, const char *name, iox_stat_t *stat, unsigned int statmask);
 int pfsRename(iop_file_t *f, const char *old, const char *new);
 int pfsChdir(iop_file_t *f, const char *name);
 int pfsSync(iop_file_t *f, const char *dev, int flag);
 int pfsSymlink(iop_file_t *f, const char *old, const char *new);
 int pfsReadlink(iop_file_t *f, const char *path, char *buf, int buflen);
 
-int fioUnsupported();
+int pfsUnsupported();
 
 #endif /* _PFS_FIO_H */
 extern int size_smb_mcemu_irx;
 #endif
 
-static char ethPath[40];
-static char* ethPrefix;
+static char ethPrefix[40];
+static char* ethBase;
 static int ethULSizePrev = -2;
 static unsigned char ethModifiedCDPrev[8];
 static unsigned char ethModifiedDVDPrev[8];
 	smbOpenShare_in_t openshare;
 
 	if (gETHPrefix[0] != '\0')
-		sprintf(ethPath, "%s%s\\", ethPrefix, gETHPrefix);
+		sprintf(ethPrefix, "%s%s\\", ethBase, gETHPrefix);
 	else
-		sprintf(ethPath, ethPrefix);
+		sprintf(ethPrefix, ethBase);
 
 	// open tcp connection with the server / logon to SMB server
 	sprintf(logon.serverIP, "%d.%d.%d.%d", pc_ip[0], pc_ip[1], pc_ip[2], pc_ip[3]);
 		strncpy(logon.User, gPCUserName, 32);
 		strncpy(passwd.password, gPCPassword, 32);
 
-		if (fileXioDevctl(ethPrefix, SMB_DEVCTL_GETPASSWORDHASHES, (void *)&passwd, sizeof(passwd), (void *)&passwdhashes, sizeof(passwdhashes)) == 0) {
+		if (fileXioDevctl(ethBase, SMB_DEVCTL_GETPASSWORDHASHES, (void *)&passwd, sizeof(passwd), (void *)&passwdhashes, sizeof(passwdhashes)) == 0) {
 			// hash generated okay, can use
 			memcpy((void *)logon.Password, (void *)&passwdhashes, sizeof(passwdhashes));
 			logon.PasswordType = HASHED_PASSWORD;
 	}
 
 	gNetworkStartup = ERROR_ETH_SMB_LOGON;
-	if (fileXioDevctl(ethPrefix, SMB_DEVCTL_LOGON, (void *)&logon, sizeof(logon), NULL, 0) >= 0) {
+	if (fileXioDevctl(ethBase, SMB_DEVCTL_LOGON, (void *)&logon, sizeof(logon), NULL, 0) >= 0) {
 		gNetworkStartup = ERROR_ETH_SMB_ECHO;
 
 		// SMB server alive test
 		strcpy(echo.echo, "ALIVE ECHO TEST");
 		echo.len = strlen("ALIVE ECHO TEST");
 
-		if (fileXioDevctl(ethPrefix, SMB_DEVCTL_ECHO, (void *)&echo, sizeof(echo), NULL, 0) >= 0) {
+		if (fileXioDevctl(ethBase, SMB_DEVCTL_ECHO, (void *)&echo, sizeof(echo), NULL, 0) >= 0) {
 			gNetworkStartup = ERROR_ETH_SMB_OPENSHARE;
 
 			if (gPCShareName[0]) {
 				// connect to the share
 				strcpy(openshare.ShareName, gPCShareName);
 
-				if (fileXioDevctl(ethPrefix, SMB_DEVCTL_OPENSHARE, (void *)&openshare, sizeof(openshare), NULL, 0) >= 0) {
+				if (fileXioDevctl(ethBase, SMB_DEVCTL_OPENSHARE, (void *)&openshare, sizeof(openshare), NULL, 0) >= 0) {
 
 					// everything is ok
 					gNetworkStartup = 0;
 	int ret;
 
 	// closing share
-	ret = fileXioDevctl(ethPrefix, SMB_DEVCTL_CLOSESHARE, NULL, 0, NULL, 0);
+	ret = fileXioDevctl(ethBase, SMB_DEVCTL_CLOSESHARE, NULL, 0, NULL, 0);
 	if (ret < 0)
 		return -1;
 
 	// logoff/close tcp connection from SMB server:
-	ret = fileXioDevctl(ethPrefix, SMB_DEVCTL_LOGOFF, NULL, 0, NULL, 0);
+	ret = fileXioDevctl(ethBase, SMB_DEVCTL_LOGOFF, NULL, 0, NULL, 0);
 	if (ret < 0)
 		return -2;
 
 	if (gNetworkStartup == 0) {
 		// update Themes
 		char path[255];
-		sprintf(path, "%sTHM", ethPath);
+		sprintf(path, "%sTHM", ethPrefix);
 		thmAddElements(path, "\\", ethGameList.mode);
 
-		sprintf(path, "%sCFG", ethPath);
+		sprintf(path, "%sCFG", ethPrefix);
 		checkCreateDir(path);
 
 #ifdef VMC
-		sprintf(path, "%sVMC", ethPath);
+		sprintf(path, "%sVMC", ethPrefix);
 		checkCreateDir(path);
 #endif
 	} else if (gPCShareName[0] || !(gNetworkStartup >= ERROR_ETH_SMB_OPENSHARE))
 
 		ioPutRequest(IO_CUSTOM_SIMPLEACTION, &ethInitSMB);
 	} else {
-		ethPrefix = "smb0:";
+		ethBase = "smb0:";
 		ethULSizePrev = -2;
 		memset(ethModifiedCDPrev, 0, 8);
 		memset(ethModifiedDVDPrev, 0, 8);
 		fio_stat_t stat;
 		char path[255];
 
-		sprintf(path, "%sCD", ethPath);
+		sprintf(path, "%sCD", ethPrefix);
 		if (fioGetstat(path, &stat) != 0)
 			memset(stat.mtime, 0, 8);
 		if (memcmp(ethModifiedCDPrev, stat.mtime, 8)) {
 			return 1;
 		}
 
-		sprintf(path, "%sDVD", ethPath);
+		sprintf(path, "%sDVD", ethPrefix);
 		if (fioGetstat(path, &stat) != 0)
 			memset(stat.mtime, 0, 8);
 		if (memcmp(ethModifiedDVDPrev, stat.mtime, 8)) {
 			return 1;
 		}
 
-		if (!sbIsSameSize(ethPath, ethULSizePrev))
+		if (!sbIsSameSize(ethPrefix, ethULSizePrev))
 			return 1;
 	}
 
 		if (gNetworkStartup != 0)
 			return 0;
 
-		sbReadList(&ethGames, ethPath, &ethULSizePrev, &ethGameCount);
+		sbReadList(&ethGames, ethPrefix, &ethULSizePrev, &ethGameCount);
 	} else {
 		int i, count;
 		ShareEntry_t sharelist[128] __attribute__((aligned(64)));
 		getsharelist.EE_addr = (void *)&sharelist[0];
 		getsharelist.maxent = 128;
 
-		count = fileXioDevctl(ethPrefix, SMB_DEVCTL_GETSHARELIST, (void *)&getsharelist, sizeof(getsharelist), NULL, 0);
+		count = fileXioDevctl(ethBase, SMB_DEVCTL_GETSHARELIST, (void *)&getsharelist, sizeof(getsharelist), NULL, 0);
 		if (count > 0) {
 			free(ethGames);
 			ethGames = (base_game_info_t*)malloc(sizeof(base_game_info_t) * count);
 
 #ifndef __CHILDPROOF
 static void ethDeleteGame(int id) {
-	sbDelete(&ethGames, ethPath, "\\", ethGameCount, id);
+	sbDelete(&ethGames, ethPrefix, "\\", ethGameCount, id);
 	ethULSizePrev = -2;
 }
 
 static void ethRenameGame(int id, char* newName) {
-	sbRename(&ethGames, ethPath, "\\", ethGameCount, id, newName);
+	sbRename(&ethGames, ethPrefix, "\\", ethGameCount, id, newName);
 	ethULSizePrev = -2;
 }
 #endif
 		memset(&smb_vmc_infos, 0, sizeof(smb_vmc_infos_t));
 		configGetVMC(configSet, vmc_name, vmc_id);
 		if (vmc_name[0]) {
-			if (sysCheckVMC(ethPath, "\\", vmc_name, 0, &vmc_superblock) > 0) {
+			if (sysCheckVMC(ethPrefix, "\\", vmc_name, 0, &vmc_superblock) > 0) {
 				smb_vmc_infos.flags = vmc_superblock.mc_flag & 0xFF;
 				smb_vmc_infos.flags |= 0x100;
 				smb_vmc_infos.specs.page_size = vmc_superblock.page_size;
 }
 
 static config_set_t* ethGetConfig(int id) {
-	return sbPopulateConfig(&ethGames[id], ethPath, "\\");
+	return sbPopulateConfig(&ethGames[id], ethPrefix, "\\");
 }
 
 static int ethGetImage(char* folder, int isRelative, char* value, char* suffix, GSTEXTURE* resultTex, short psm) {
 	char path[255];
 	if (isRelative)
-		sprintf(path, "%s%s\\%s_%s", ethPath, folder, value, suffix);
+		sprintf(path, "%s%s\\%s_%s", ethPrefix, folder, value, suffix);
 	else
 		sprintf(path, "%s%s_%s", folder, value, suffix);
 	return texDiscoverLoad(resultTex, path, -1, psm);
 
 #ifdef VMC
 static int ethCheckVMC(char* name, int createSize) {
-	return sysCheckVMC(ethPath, "\\", name, createSize, NULL);
+	return sysCheckVMC(ethPrefix, "\\", name, createSize, NULL);
 }
 #endif