diff --git a/CMakeLists.txt b/CMakeLists.txt index 2de5f81f..d8728ad2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,7 +14,7 @@ project(VitaShell) include("${VITASDK}/share/vita.cmake" REQUIRED) set(VITA_APP_NAME "VitaShell") set(VITA_TITLEID "VITASHELL") -set(VITA_VERSION "01.93") +set(VITA_VERSION "01.94") # Flags and includes set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 -Wno-unused-variable -Wno-unused-but-set-variable -Wno-format-truncation -fno-lto") @@ -205,6 +205,6 @@ add_custom_target(send ) add_custom_target(copy - COMMAND cp eboot.bin F:/app/${VITA_TITLEID}/eboot.bin + COMMAND cp eboot.bin H:/app/${VITA_TITLEID}/eboot.bin DEPENDS eboot.bin ) diff --git a/README.md b/README.md index ea12eb68..4a879486 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,10 @@ Credits Changelog --------- +### Changelog 1.94 +- Added ability to umount all partitions that you can mount. +- Fixed crash when using StorageMgr. + ### Changelog 1.93 - Added xmc0: to partition list and added ability to mount xmc0:. - Fixed ux0: mounting bug where it wasn't detected that the gamesd has already been mounted. diff --git a/language.c b/language.c index 707e2bdb..78a56f5f 100644 --- a/language.c +++ b/language.c @@ -107,6 +107,9 @@ void loadLanguage(int id) { LANGUAGE_ENTRY(MOUNT_UMA0), LANGUAGE_ENTRY(MOUNT_IMC0), LANGUAGE_ENTRY(MOUNT_XMC0), + LANGUAGE_ENTRY(UMOUNT_UMA0), + LANGUAGE_ENTRY(UMOUNT_IMC0), + LANGUAGE_ENTRY(UMOUNT_XMC0), LANGUAGE_ENTRY(MOUNT_USB_UX0), LANGUAGE_ENTRY(UMOUNT_USB_UX0), LANGUAGE_ENTRY(MOUNT_GAMECARD_UX0), @@ -230,7 +233,6 @@ void loadLanguage(int id) { // USB strings LANGUAGE_ENTRY(USB_CONNECTED), - LANGUAGE_ENTRY(USB_UMA0_MOUNTED), LANGUAGE_ENTRY(USB_UX0_MOUNTED), LANGUAGE_ENTRY(USB_UX0_UMOUNTED), LANGUAGE_ENTRY(GAMECARD_UX0_MOUNTED), @@ -253,8 +255,12 @@ void loadLanguage(int id) { LANGUAGE_ENTRY(ADHOC_CLIENT_DECLINED), // Others + LANGUAGE_ENTRY(UMA0_MOUNTED), LANGUAGE_ENTRY(IMC0_MOUNTED), LANGUAGE_ENTRY(XMC0_MOUNTED), + LANGUAGE_ENTRY(UMA0_UMOUNTED), + LANGUAGE_ENTRY(IMC0_UMOUNTED), + LANGUAGE_ENTRY(XMC0_UMOUNTED), LANGUAGE_ENTRY(SAFE_MODE), LANGUAGE_ENTRY(UNSAFE_MODE), LANGUAGE_ENTRY(PLEASE_WAIT), diff --git a/language.h b/language.h index 2396307a..8afc307f 100644 --- a/language.h +++ b/language.h @@ -66,6 +66,9 @@ enum LanguageContainer { MOUNT_UMA0, MOUNT_IMC0, MOUNT_XMC0, + UMOUNT_UMA0, + UMOUNT_IMC0, + UMOUNT_XMC0, MOUNT_USB_UX0, UMOUNT_USB_UX0, MOUNT_GAMECARD_UX0, @@ -192,7 +195,6 @@ enum LanguageContainer { USB_NOT_CONNECTED, USB_CONNECTION_NOT_AVAILABLE, USB_WAIT_ATTACH, - USB_UMA0_MOUNTED, USB_UX0_MOUNTED, USB_UX0_UMOUNTED, GAMECARD_UX0_MOUNTED, @@ -212,8 +214,12 @@ enum LanguageContainer { ADHOC_CLIENT_DECLINED, // Others + UMA0_MOUNTED, IMC0_MOUNTED, XMC0_MOUNTED, + UMA0_UMOUNTED, + IMC0_UMOUNTED, + XMC0_UMOUNTED, SAFE_MODE, UNSAFE_MODE, PLEASE_WAIT, diff --git a/main.c b/main.c index 152a3ffd..143dc3f6 100644 --- a/main.c +++ b/main.c @@ -673,7 +673,7 @@ static int dialogSteps() { if (res < 0) errorDialog(res); else - infoDialog(language_container[USB_UMA0_MOUNTED]); + infoDialog(language_container[UMA0_MOUNTED]); refresh = REFRESH_MODE_NORMAL; } } diff --git a/main.h b/main.h index c8af8928..fb71c241 100644 --- a/main.h +++ b/main.h @@ -53,7 +53,7 @@ // VitaShell version major.minor #define VITASHELL_VERSION_MAJOR 0x01 -#define VITASHELL_VERSION_MINOR 0x93 +#define VITASHELL_VERSION_MINOR 0x94 #define VITASHELL_VERSION ((VITASHELL_VERSION_MAJOR << 0x18) | (VITASHELL_VERSION_MINOR << 0x10)) diff --git a/main_context.c b/main_context.c index 3237f222..ab5cafee 100644 --- a/main_context.c +++ b/main_context.c @@ -39,6 +39,9 @@ enum MenuHomeEntrys { MENU_HOME_ENTRY_MOUNT_UMA0, MENU_HOME_ENTRY_MOUNT_IMC0, MENU_HOME_ENTRY_MOUNT_XMC0, + MENU_HOME_ENTRY_UMOUNT_UMA0, + MENU_HOME_ENTRY_UMOUNT_IMC0, + MENU_HOME_ENTRY_UMOUNT_XMC0, MENU_HOME_ENTRY_MOUNT_USB_UX0, MENU_HOME_ENTRY_UMOUNT_USB_UX0, MENU_HOME_ENTRY_MOUNT_GAMECARD_UX0, @@ -51,10 +54,13 @@ MenuEntry menu_home_entries[] = { { MOUNT_UMA0, 3, 0, CTX_INVISIBLE }, { MOUNT_IMC0, 4, 0, CTX_INVISIBLE }, { MOUNT_XMC0, 5, 0, CTX_INVISIBLE }, - { MOUNT_USB_UX0, 7, 0, CTX_INVISIBLE }, - { UMOUNT_USB_UX0, 8, 0, CTX_INVISIBLE }, - { MOUNT_GAMECARD_UX0, 10, 0, CTX_INVISIBLE }, - { UMOUNT_GAMECARD_UX0, 11, 0, CTX_INVISIBLE }, + { UMOUNT_UMA0, 7, 0, CTX_INVISIBLE }, + { UMOUNT_IMC0, 8, 0, CTX_INVISIBLE }, + { UMOUNT_XMC0, 9, 0, CTX_INVISIBLE }, + { MOUNT_USB_UX0, 11, 0, CTX_INVISIBLE }, + { UMOUNT_USB_UX0, 12, 0, CTX_INVISIBLE }, + { MOUNT_GAMECARD_UX0, 14, 0, CTX_INVISIBLE }, + { UMOUNT_GAMECARD_UX0, 15, 0, CTX_INVISIBLE }, }; #define N_MENU_HOME_ENTRIES (sizeof(menu_home_entries) / sizeof(MenuEntry)) @@ -360,6 +366,18 @@ void setContextMenuHomeVisibilities() { if (!checkFileExist("sdstor0:xmc-lp-ign-userext") || checkFolderExist("xmc0:")) menu_home_entries[MENU_HOME_ENTRY_MOUNT_XMC0].visibility = CTX_INVISIBLE; + // Invisible if not mounted + if (!checkFolderExist("uma0:")) + menu_home_entries[MENU_HOME_ENTRY_UMOUNT_UMA0].visibility = CTX_INVISIBLE; + + // Invisible if not mounted + if (!checkFolderExist("imc0:")) + menu_home_entries[MENU_HOME_ENTRY_UMOUNT_IMC0].visibility = CTX_INVISIBLE; + + // Invisible if not mounted + if (!checkFolderExist("xmc0:")) + menu_home_entries[MENU_HOME_ENTRY_UMOUNT_XMC0].visibility = CTX_INVISIBLE; + // Go to first entry for (i = 0; i < N_MENU_HOME_ENTRIES; i++) { if (menu_home_entries[i].visibility == CTX_VISIBLE) { @@ -642,7 +660,7 @@ static int contextMenuHomeEnterCallback(int sel, void *context) { if (res < 0) errorDialog(res); else - infoDialog(language_container[USB_UMA0_MOUNTED]); + infoDialog(language_container[UMA0_MOUNTED]); refreshFileList(); } else { initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_CANCEL, language_container[USB_WAIT_ATTACH]); @@ -684,7 +702,49 @@ static int contextMenuHomeEnterCallback(int sel, void *context) { break; } + + case MENU_HOME_ENTRY_UMOUNT_UMA0: + { + if (is_safe_mode) { + infoDialog(language_container[EXTENDED_PERMISSIONS_REQUIRED]); + } else { + vshIoUmount(0xF00, 0, 0, 0); + vshIoUmount(0xF00, 1, 0, 0); + infoDialog(language_container[UMA0_UMOUNTED]); + refreshFileList(); + } + + break; + } + case MENU_HOME_ENTRY_UMOUNT_IMC0: + { + if (is_safe_mode) { + infoDialog(language_container[EXTENDED_PERMISSIONS_REQUIRED]); + } else { + vshIoUmount(0xD00, 0, 0, 0); + vshIoUmount(0xD00, 1, 0, 0); + infoDialog(language_container[IMC0_UMOUNTED]); + refreshFileList(); + } + + break; + } + + case MENU_HOME_ENTRY_UMOUNT_XMC0: + { + if (is_safe_mode) { + infoDialog(language_container[EXTENDED_PERMISSIONS_REQUIRED]); + } else { + vshIoUmount(0xE00, 0, 0, 0); + vshIoUmount(0xE00, 1, 0, 0); + infoDialog(language_container[XMC0_UMOUNTED]); + refreshFileList(); + } + + break; + } + case MENU_HOME_ENTRY_MOUNT_USB_UX0: { if (mountUsbUx0() >= 0) { diff --git a/modules/kernel/main.c b/modules/kernel/main.c index fdfef8d5..b2e55be1 100644 --- a/modules/kernel/main.c +++ b/modules/kernel/main.c @@ -94,7 +94,7 @@ int shellKernelIsUx0Redirected(const char *blkdev, const char *blkdev2) { ksceKernelStrncpyUserToKernel(k_blkdev, blkdev, sizeof(k_blkdev)-1); ksceKernelStrncpyUserToKernel(k_blkdev2, blkdev2, sizeof(k_blkdev2)-1); - if (mount && mount->dev && strcmp(mount->dev->blkdev, k_blkdev) == 0 && strcmp(mount->dev->blkdev2, k_blkdev2) == 0) { + if (mount && mount->dev && mount->dev->blkdev && strcmp(mount->dev->blkdev, k_blkdev) == 0) { EXIT_SYSCALL(state); return 1; } diff --git a/pkg/sce_sys/livearea/contents/template.xml b/pkg/sce_sys/livearea/contents/template.xml index c1692b13..50f8e18f 100644 --- a/pkg/sce_sys/livearea/contents/template.xml +++ b/pkg/sce_sys/livearea/contents/template.xml @@ -28,7 +28,7 @@ - v1.93 + v1.94 diff --git a/release/VitaShell.vpk b/release/VitaShell.vpk index 092a71ac..357fc94c 100644 Binary files a/release/VitaShell.vpk and b/release/VitaShell.vpk differ diff --git a/release/eboot.bin b/release/eboot.bin index 4afe4639..6c8294ef 100644 Binary files a/release/eboot.bin and b/release/eboot.bin differ diff --git a/release/param.sfo b/release/param.sfo index 37e1c656..a221b46b 100644 Binary files a/release/param.sfo and b/release/param.sfo differ diff --git a/release/template.xml b/release/template.xml index c1692b13..50f8e18f 100644 --- a/release/template.xml +++ b/release/template.xml @@ -28,7 +28,7 @@ - v1.93 + v1.94 diff --git a/release/version.bin b/release/version.bin index ea8102c9..f4b77bd3 100644 Binary files a/release/version.bin and b/release/version.bin differ diff --git a/resources/english_us.txt b/resources/english_us.txt index f2ce178c..a70f5d59 100644 --- a/resources/english_us.txt +++ b/resources/english_us.txt @@ -47,6 +47,9 @@ REFRESH_LICENSE_DB = "Refresh license database" MOUNT_UMA0 = "Mount uma0:" MOUNT_IMC0 = "Mount imc0:" MOUNT_XMC0 = "Mount xmc0:" +UMOUNT_UMA0 = "Umount uma0:" +UMOUNT_IMC0 = "Umount imc0:" +UMOUNT_XMC0 = "Umount xmc0:" MOUNT_USB_UX0 = "Mount USB ux0:" UMOUNT_USB_UX0 = "Umount USB ux0:" MOUNT_GAMECARD_UX0 = "Mount gamecard ux0:" @@ -170,7 +173,6 @@ VITASHELL_SETTINGS_SELECT_BUTTON_FTP = "FTP" # USB strings USB_CONNECTED = "USB connected" -USB_UMA0_MOUNTED = "uma0: mounted." USB_UX0_MOUNTED = "USB ux0: mounted." USB_UX0_UMOUNTED = "USB ux0: umounted." GAMECARD_UX0_MOUNTED = "gamecard ux0: mounted." @@ -193,8 +195,12 @@ ADHOC_RECEIVE_QUESTION = "Do you want to receive from %s?" ADHOC_CLIENT_DECLINED = "The client has declined your request." # Others +UMA0_MOUNTED = "uma0: mounted." +UMA0_UMOUNTED = "uma0: umounted." IMC0_MOUNTED = "imc0: mounted." +IMC0_UMOUNTED = "imc0: umounted." XMC0_MOUNTED = "xmc0: mounted." +XMC0_UMOUNTED = "xmc0: umounted." SAFE_MODE = "SAFE MODE" UNSAFE_MODE = "UNSAFE MODE" PLEASE_WAIT = "Please wait..." diff --git a/resources/kernel.skprx b/resources/kernel.skprx index d0bc2ddc..b74c3f02 100644 Binary files a/resources/kernel.skprx and b/resources/kernel.skprx differ