mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-11-09 22:56:35 +00:00
parent
8b418732ad
commit
a29e800661
2 changed files with 16 additions and 3 deletions
|
@ -94,8 +94,11 @@ int fsdev_mount_device(const char *name) {
|
|||
if (!g_devices[i].setup) {
|
||||
fsdev_fsdevice_t *device = &g_devices[i];
|
||||
FRESULT rc;
|
||||
char drname[40];
|
||||
strcpy(drname, name);
|
||||
strcat(drname, ":");
|
||||
|
||||
rc = f_mount(&device->fatfs, name, 1);
|
||||
rc = f_mount(&device->fatfs, drname, 1);
|
||||
|
||||
if (rc != FR_OK) {
|
||||
return fsdev_convert_rc(NULL, rc);
|
||||
|
@ -127,6 +130,7 @@ int fsdev_set_default_device(const char *name) {
|
|||
#else
|
||||
|
||||
int ret;
|
||||
char drname[40];
|
||||
int devid = FindDevice(name);
|
||||
|
||||
if (devid == -1) {
|
||||
|
@ -134,7 +138,10 @@ int fsdev_set_default_device(const char *name) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
ret = fsdev_convert_rc(NULL, f_chdrive(name));
|
||||
strcpy(drname, name);
|
||||
strcat(drname, ":");
|
||||
|
||||
ret = fsdev_convert_rc(NULL, f_chdrive(drname));
|
||||
|
||||
if (ret == 0) {
|
||||
setDefaultDevice(devid);
|
||||
|
@ -146,14 +153,17 @@ int fsdev_set_default_device(const char *name) {
|
|||
|
||||
int fsdev_unmount_device(const char *name) {
|
||||
int ret;
|
||||
char drname[40];
|
||||
int devid = FindDevice(name);
|
||||
|
||||
if (devid == -1) {
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
strcpy(drname, name);
|
||||
strcat(drname, ":");
|
||||
|
||||
ret = fsdev_convert_rc(NULL, f_unmount(name));
|
||||
ret = fsdev_convert_rc(NULL, f_unmount(drname));
|
||||
|
||||
if (ret == 0) {
|
||||
fsdev_fsdevice_t *device = (fsdev_fsdevice_t *)(GetDeviceOpTab(name)->deviceData);
|
||||
|
|
|
@ -47,6 +47,9 @@ int main(int argc, void **argv) {
|
|||
|
||||
/* TODO: What other hardware init should we do here? */
|
||||
|
||||
/* Setup console/stdout. */
|
||||
console_resume(args.lfb, args.console_row, args.console_col);
|
||||
|
||||
printf(u8"Welcome to Atmosphère Fusée Stage 2!\n");
|
||||
printf("Stage 2 executing from: %s\n", (const char *)argv[STAGE2_ARGV_PROGRAM_PATH]);
|
||||
|
||||
|
|
Loading…
Reference in a new issue