Pass a tool number to umka_init command
Implemented tools: + umka_shell + umka_fuse + umka_os + umka_gen_devices_dat
This commit is contained in:
+22
@@ -7,9 +7,31 @@
|
||||
Copyright (C) 2023 Ivan Baravy <dunkaist@gmail.com>
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "io.h"
|
||||
|
||||
struct umka_io {
|
||||
int change_task;
|
||||
int uring_fd;
|
||||
};
|
||||
|
||||
void *
|
||||
io_init(int change_task) {
|
||||
struct umka_io *io = malloc(sizeof(struct umka_io));
|
||||
io->change_task = change_task;
|
||||
if (change_task) {
|
||||
io->uring_fd = 1;
|
||||
}
|
||||
return io;
|
||||
}
|
||||
|
||||
void
|
||||
io_close(void *userdata) {
|
||||
struct umka_io *io = (struct umka_io*)userdata;
|
||||
free(io);
|
||||
}
|
||||
|
||||
ssize_t
|
||||
io_read(int fd, void *buf, size_t count, int change_task) {
|
||||
(void)change_task;
|
||||
|
||||
@@ -408,14 +408,27 @@ static void
|
||||
cmd_umka_init(struct shell_ctx *ctx, int argc, char **argv) {
|
||||
(void)ctx;
|
||||
const char *usage = \
|
||||
"usage: umka_init";
|
||||
(void)argv;
|
||||
if (argc != 1) {
|
||||
"usage: umka_init <tool>\n"
|
||||
" <tool> number or string: 1=shell, 2=fuse, 3=os";
|
||||
if (argc != 2) {
|
||||
puts(usage);
|
||||
return;
|
||||
}
|
||||
const char *tool_str = argv[1];
|
||||
unsigned tool;
|
||||
if (!strcmp(tool_str, "1") || !strcmp(tool_str, "shell")) {
|
||||
tool = UMKA_SHELL;
|
||||
} else if (!strcmp(tool_str, "2") || !strcmp(tool_str, "fuse")) {
|
||||
tool = UMKA_FUSE;
|
||||
} else if (!strcmp(tool_str, "3") || !strcmp(tool_str, "os")) {
|
||||
tool = UMKA_OS;
|
||||
} else {
|
||||
printf("[!] bad tool value: '%s'\n", tool_str);
|
||||
return;
|
||||
}
|
||||
|
||||
COVERAGE_ON();
|
||||
umka_init();
|
||||
umka_init(tool);
|
||||
COVERAGE_OFF();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 0
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 0
|
||||
disk_add ../img/xfs_short_dir_i8.qcow2 hd1 -c 0
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/sf_empty
|
||||
ls70 /hd0/1/sf
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
# zero length
|
||||
read70 /hd0/1/no_hole 0 0 -b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
stat70 /hd0/1/
|
||||
stat70 /hd0/1/hole_begin
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
pwd
|
||||
cd /hd0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
# hole begin
|
||||
# zero length
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
stat70 /hd0/1/sf_empty
|
||||
stat70 /hd0/1/sf_empty/.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_ftype0_s4k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=4096, capacity=77312 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=256 (1 MiB), length=76800 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_ftype0_s4k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/sf
|
||||
ls70 /hd0/1/block
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k_xattr.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k_xattr.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/sf_empty
|
||||
ls70 /hd0/1/sf
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k_xattr.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_ftype0_s05k_b2k_n8k_xattr.qcow2 hd0 -c 524288
|
||||
stat70 /hd0/1/sf_empty
|
||||
stat70 /hd0/1/sf_empty/.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_unicode.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_unicode.qcow2 hd0 -c 524288
|
||||
|
||||
stat80 /hd0/1/dir0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v5_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v5_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/sf_empty
|
||||
ls70 /hd0/1/sf
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v5_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v5_ftype1_s05k_b2k_n8k.qcow2 hd0 -c 524288
|
||||
stat70 /hd0/1/sf_empty
|
||||
stat70 /hd0/1/sf_empty/.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v5_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v5_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
# hole begin
|
||||
# zero length
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v5_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v5_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
# zero length
|
||||
read70 /hd0/1/no_hole 0 0 -b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> set_mouse_pos_screen 40 30
|
||||
/> #disk_add ../img/kolibri.raw rd -c 0
|
||||
/> ramdisk_init ../img/kolibri.raw
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
set_mouse_pos_screen 40 30
|
||||
#disk_add ../img/kolibri.raw rd -c 0
|
||||
ramdisk_init ../img/kolibri.raw
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_files_s05k_b4k_n8k.qcow2 hd0 -c 524288
|
||||
|
||||
read70 /hd0/1/4GiB_plus 0x3ff4 11 -b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/jfs.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=32768 (16 MiB), num_partitions=1
|
||||
/hd0/1: fs=???, start=2048 (1 MiB), length=28672 (14 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/jfs.qcow2 hd0 -c 524288
|
||||
disk_del hd0
|
||||
disk_add ../img/xfs_borg_bit.qcow2 hd0 -c 524288
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_v4_btrees_l2.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_v4_btrees_l2.qcow2 hd0 -c 524288
|
||||
|
||||
ls80 /hd0/1/dir_btree_l2 -f 0 -c 1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> i40 18 16
|
||||
eax = 00040000 262144 262144
|
||||
ebx = 00000010 16 16
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
i40 18 16
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/> umka_set_boot_params --x_res 44 --y_res 44
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> ramdisk_init ../img/kolibri.raw
|
||||
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
|
||||
/rd/1: fs=fat, start=0 (0 B), length=2880 (1440 kiB)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
umka_set_boot_params --x_res 44 --y_res 44
|
||||
umka_init
|
||||
umka_init shell
|
||||
ramdisk_init ../img/kolibri.raw
|
||||
set_skin /sys/DEFAULT.SKN
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/fat32_test0.raw hd0 -c 0
|
||||
/hd0: sector_size=512, capacity=131072 (64 MiB), num_partitions=1
|
||||
/hd0/1: fs=fat, start=2048 (1 MiB), length=126976 (62 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/fat32_test0.raw hd0 -c 0
|
||||
ls80 /hd0/1/
|
||||
read70 /hd0/1/A 0 16388096 -h
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/exfat_s05k_c16k_b16k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=exfat, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/exfat_s05k_c16k_b16k.qcow2 hd0 -c 524288
|
||||
|
||||
ls70 /hd0/1/dir_0 -f 0 -c 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/exfat_s05k_c8k_b8k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=exfat, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/exfat_s05k_c8k_b8k.qcow2 hd0 -c 524288
|
||||
|
||||
stat70 /hd0/1/dir_000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/>
|
||||
/> get_keyboard_mode
|
||||
keyboard_mode: 0 - ASCII
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
|
||||
get_keyboard_mode
|
||||
get_keyboard_lang
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/>
|
||||
/> get_mouse_pos_screen
|
||||
x y: 200 150
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
|
||||
get_mouse_pos_screen
|
||||
get_mouse_pos_window
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> #set_mouse_pos_screen 40 30
|
||||
/> ramdisk_init ../img/kolibri.raw
|
||||
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
#set_mouse_pos_screen 40 30
|
||||
ramdisk_init ../img/kolibri.raw
|
||||
set_skin /sys/DEFAULT.SKN
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
check_for_event
|
||||
check_for_event
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/>
|
||||
/> ramdisk_init ../img/kolibri.raw
|
||||
/rd: sector_size=512, capacity=2880 (1440 kiB), num_partitions=1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
|
||||
ramdisk_init ../img/kolibri.raw
|
||||
set_skin /sys/DEFAULT.SKN
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_bigtime.qcow2 hd0 -c 0
|
||||
/hd0: sector_size=512, capacity=618496 (302 MiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=614400 (300 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_bigtime.qcow2 hd0 -c 0
|
||||
ls70 /hd0/1/
|
||||
ls70 /hd0/1/dira
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_nrext64.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=6291456 (3 GiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=6287360 (3070 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_nrext64.qcow2 hd0 -c 524288
|
||||
stat70 /hd0/1/dir_sf
|
||||
stat70 /hd0/1/dir_block
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_lookup_v5.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=10485760 (5 GiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=10481664 (5118 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_lookup_v5.qcow2 hd0 -c 524288
|
||||
cd /hd0/1/dir_sf
|
||||
stat70 d0000000000/d0000000000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_lookup_v4.qcow2 hd0 -c 1048576
|
||||
/hd0: sector_size=512, capacity=6291456 (3 GiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=6287360 (3070 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_lookup_v4.qcow2 hd0 -c 1048576
|
||||
cd /hd0/1/dir_sf
|
||||
stat70 d0000000000/d0000000000
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/gpt_partitions_s05k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=2097152 (1 GiB), num_partitions=24
|
||||
/hd0/1: fs=???, start=2048 (1 MiB), length=2048 (1 MiB)
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/gpt_partitions_s05k.qcow2 hd0 -c 524288
|
||||
disk_del hd0
|
||||
disk_add ../img/gpt_partitions_s4k.qcow2 hd0 -c 524288
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/ext2_s05k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=10485760 (5 GiB), num_partitions=1
|
||||
/hd0/1: fs=ext, start=2048 (1 MiB), length=10481664 (5118 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/ext2_s05k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/dir_a
|
||||
ls70 /hd0/1/dir_b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/ext4_s05k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=10485760 (5 GiB), num_partitions=1
|
||||
/hd0/1: fs=???, start=2048 (1 MiB), length=10481664 (5118 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/ext4_s05k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/dir_a
|
||||
ls70 /hd0/1/dir_b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/fat12_s05k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=524288 (256 MiB), num_partitions=1
|
||||
/hd0/1: fs=fat, start=2048 (1 MiB), length=520192 (254 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/fat12_s05k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/dir_a
|
||||
ls70 /hd0/1/dir_b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/fat16_s05k.qcow2 hd0 -c 524288
|
||||
/hd0: sector_size=512, capacity=8388608 (4 GiB), num_partitions=1
|
||||
/hd0/1: fs=fat, start=2048 (1 MiB), length=8384481 (4292854272 B)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/fat16_s05k.qcow2 hd0 -c 524288
|
||||
ls70 /hd0/1/dir_a
|
||||
ls70 /hd0/1/dir_b
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/> umka_init
|
||||
/> umka_init shell
|
||||
/> disk_add ../img/xfs_samehash_s05k.raw hd0 -c 0
|
||||
/hd0: sector_size=512, capacity=2097152 (1 GiB), num_partitions=1
|
||||
/hd0/1: fs=xfs, start=2048 (1 MiB), length=2093056 (1022 MiB)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
umka_init
|
||||
umka_init shell
|
||||
disk_add ../img/xfs_samehash_s05k.raw hd0 -c 0
|
||||
ls70 /hd0/1/dir_sf
|
||||
ls70 /hd0/1/dir_block
|
||||
|
||||
@@ -555,7 +555,9 @@ proc kos_eth_input c uses ebx esi edi ebp, buffer_ptr
|
||||
ret
|
||||
endp
|
||||
|
||||
proc umka_init c uses ebx esi edi ebp
|
||||
proc umka_init c uses ebx esi edi ebp, _tool
|
||||
mov eax, [_tool]
|
||||
mov [umka_tool], eax
|
||||
mov [umka_initialized], 1
|
||||
call umka._.check_alignment
|
||||
|
||||
|
||||
@@ -533,7 +533,7 @@ void
|
||||
irq0(int signo, siginfo_t *info, void *context);
|
||||
|
||||
void
|
||||
umka_init(void);
|
||||
umka_init(int tool);
|
||||
|
||||
void
|
||||
i40(void);
|
||||
@@ -1037,9 +1037,10 @@ typedef struct {
|
||||
|
||||
_Static_assert(sizeof(appdata_t) == 256, "must be 0x100 bytes long");
|
||||
|
||||
#define UMKA_SHELL 1u
|
||||
#define UMKA_FUSE 2u
|
||||
#define UMKA_OS 3u
|
||||
#define UMKA_SHELL 1
|
||||
#define UMKA_FUSE 2
|
||||
#define UMKA_OS 3
|
||||
#define UMKA_GEN_DEVICES_DAT 4
|
||||
|
||||
#define MAX_PRIORITY 0 // highest, used for kernel tasks
|
||||
#define USER_PRIORITY 1 // default
|
||||
|
||||
+1
-1
@@ -150,7 +150,7 @@ main(int argc, char *argv[]) {
|
||||
kos_boot.y_res = UMKA_DEFAULT_DISPLAY_HEIGHT;
|
||||
kos_boot.pitch = UMKA_DEFAULT_DISPLAY_WIDTH*4; // 32bpp
|
||||
|
||||
umka_init();
|
||||
umka_init(UMKA_FUSE);
|
||||
struct vdisk *umka_disk = vdisk_init(argv[2], 1, 0u, 0);
|
||||
disk_t *disk = disk_add(&umka_disk->diskfunc, "hd0", umka_disk, 0);
|
||||
disk_media_changed(disk, 1);
|
||||
|
||||
@@ -150,7 +150,7 @@ main () {
|
||||
|
||||
strcpy(pci_path, PCI_BASE_DIR);
|
||||
|
||||
umka_init();
|
||||
umka_init(UMKA_GEN_DEVICES_DAT);
|
||||
kos_acpi_aml_init();
|
||||
ctx = kos_acpi_aml_new_thread();
|
||||
kos_acpi_dev_size = MAX_PCI_DEVICES*16;
|
||||
|
||||
Reference in New Issue
Block a user