Skip to content

Commit 44f8542

Browse files
committed
Fixed ksceIoMount params
1 parent 6ce7394 commit 44f8542

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

main.c

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -83,51 +83,28 @@ static int exists(const char *path) {
8383
return 1;
8484
}
8585

86-
static int io_mount(int id, const char *path, int permission, int a4, int a5, int a6) {
87-
uint32_t buf[6];
88-
89-
buf[0] = a4;
90-
buf[1] = a5;
91-
buf[2] = a6;
92-
buf[3] = 0;
93-
buf[4] = 0;
94-
buf[5] = 0;
95-
96-
return ksceIoMount(id, path, permission, buf);
97-
}
98-
9986
static void io_remount(int id) {
10087
ksceIoUmount(id, 0, 0, 0);
10188
ksceIoUmount(id, 1, 0, 0);
102-
io_mount(id, NULL, 0, 0, 0, 0);
89+
ksceIoMount(id, NULL, 0, 0, 0, 0);
10390
}
10491

10592
int shellKernelIsUx0Redirected() {
106-
uint32_t state;
107-
ENTER_SYSCALL(state);
108-
10993
SceIoMountPoint *mount = sceIoFindMountPoint(MOUNT_POINT_ID);
11094
if (!mount) {
111-
EXIT_SYSCALL(state);
11295
return -1;
11396
}
11497

11598
if (mount->dev == &uma_ux0_dev && mount->dev2 == &uma_ux0_dev) {
116-
EXIT_SYSCALL(state);
11799
return 1;
118100
}
119101

120-
EXIT_SYSCALL(state);
121102
return 0;
122103
}
123104

124105
int shellKernelRedirectUx0() {
125-
uint32_t state;
126-
ENTER_SYSCALL(state);
127-
128106
SceIoMountPoint *mount = sceIoFindMountPoint(MOUNT_POINT_ID);
129107
if (!mount) {
130-
EXIT_SYSCALL(state);
131108
return -1;
132109
}
133110

@@ -139,17 +116,12 @@ int shellKernelRedirectUx0() {
139116
mount->dev = &uma_ux0_dev;
140117
mount->dev2 = &uma_ux0_dev;
141118

142-
EXIT_SYSCALL(state);
143119
return 0;
144120
}
145121

146122
int shellKernelUnredirectUx0() {
147-
uint32_t state;
148-
ENTER_SYSCALL(state);
149-
150123
SceIoMountPoint *mount = sceIoFindMountPoint(MOUNT_POINT_ID);
151124
if (!mount) {
152-
EXIT_SYSCALL(state);
153125
return -1;
154126
}
155127

@@ -161,7 +133,6 @@ int shellKernelUnredirectUx0() {
161133
ori_dev2 = NULL;
162134
}
163135

164-
EXIT_SYSCALL(state);
165136
return 0;
166137
}
167138

@@ -211,7 +182,6 @@ int module_start(SceSize args, void *argp) {
211182

212183
// start memory card redirection if we don't disable it
213184
if (exists("sdstor0:uma-lp-act-entire") && !exists("ur0:DISABLE_USB_MC.txt") && !shellKernelIsUx0Redirected()) {
214-
ksceIoUmount(0xF00, 0, 0, 0);
215185
shellKernelRedirectUx0();
216186
io_remount(MOUNT_POINT_ID);
217187
}

0 commit comments

Comments
 (0)