New commands: cd and pwd. Display cwd in prompt. More tests.

This commit is contained in:
2019-10-25 04:48:13 +03:00
parent adc3e553f7
commit 3444c6bc2e
19 changed files with 719 additions and 153 deletions

4
cio.c
View File

@@ -32,11 +32,11 @@ void cio_disk_free(vdisk_t *vdisk) {
f70status cio_disk_read(vdisk_t *vdisk, uint8_t *buffer, off_t startsector, uint32_t *numsectors) {
fseeko(vdisk->file, startsector * vdisk->sect_size, SEEK_SET);
fread(buffer, *numsectors * vdisk->sect_size, 1, vdisk->file);
return F70_SUCCESS;
return F70_ERROR_SUCCESS;
}
f70status cio_disk_write(vdisk_t *vdisk, uint8_t *buffer, off_t startsector, uint32_t *numsectors) {
fseeko(vdisk->file, startsector * vdisk->sect_size, SEEK_SET);
fwrite(buffer, *numsectors * vdisk->sect_size, 1, vdisk->file);
return F70_SUCCESS;
return F70_ERROR_SUCCESS;
}

203
kofu.c
View File

@@ -13,17 +13,68 @@
#include "kolibri.h"
#include "trace.h"
#define PATH_MAX 4096
#define FGETS_BUF_LEN 4096
#define MAX_COMMAND_ARGS 42
#define PRINT_BYTES_PER_LINE 32
#define MAX_DIRENTS_TO_READ 100
#define MAX_BYTES_TO_READ (16*1024)
char cur_dir[PATH_MAX] = "/";
const char *last_dir = cur_dir;
bool cur_dir_changed = true;
char cmd_buf[FGETS_BUF_LEN];
bool is_tty;
int cmd_num = 0;
bool trace = false;
const char *f70_status_name[] = {
"success",
"disk_base",
"unsupported_fs",
"unknown_fs",
"partition",
"file_not_found",
"end_of_file",
"memory_pointer",
"disk_full",
"fs_fail",
"access_denied",
"device",
"out_of_memory"
};
const char *get_f70_status_name(f70status s) {
switch (s) {
case F70_ERROR_SUCCESS:
return "";
case F70_ERROR_DISK_BASE:
case F70_ERROR_UNSUPPORTED_FS:
case F70_ERROR_UNKNOWN_FS:
case F70_ERROR_PARTITION:
case F70_ERROR_FILE_NOT_FOUND:
case F70_ERROR_END_OF_FILE:
case F70_ERROR_MEMORY_POINTER:
case F70_ERROR_DISK_FULL:
case F70_ERROR_FS_FAIL:
case F70_ERROR_ACCESS_DENIED:
case F70_ERROR_DEVICE:
case F70_ERROR_OUT_OF_MEMORY:
return f70_status_name[s];
default:
return "unknown";
}
}
void print_f70_status(f70ret_t *r, int use_ebx) {
printf("status = %d", r->status);
if (r->status != F70_ERROR_SUCCESS)
printf(" %s", get_f70_status_name(r->status));
if (use_ebx)
printf(", count = %d", r->count);
putchar('\n');
}
bool parse_uintmax(const char *str, uintmax_t *res) {
char *endptr;
*res = strtoumax(str, &endptr, 0);
@@ -72,8 +123,23 @@ void print_hash(uint8_t *x, size_t len) {
putchar('\n');
}
const char *get_last_dir(const char *path) {
const char *last = strrchr(path, '/');
if (!last) {
last = path;
} else if (last != path || last[1] != '\0') {
last++;
}
return last;
}
void prompt() {
printf("#%d> ", cmd_num);
if (cur_dir_changed) {
kos_getcwd(cur_dir, PATH_MAX);
last_dir = get_last_dir(cur_dir);
cur_dir_changed = false;
}
printf("%s> ", last_dir);
fflush(stdout);
}
@@ -109,6 +175,21 @@ void kofu_disk_del(int argc, const char **argv) {
return;
}
void kofu_pwd(int argc, const char **argv) {
(void)argc;
(void)argv;
bool quoted = false;
const char *quote = quoted ? "'" : "";
kos_getcwd(cur_dir, PATH_MAX);
printf("%s%s%s\n", quote, cur_dir, quote);
}
void kofu_cd(int argc, const char **argv) {
(void)argc;
kos_cd(argv[1]);
cur_dir_changed = true;
}
void ls_range(f70s1arg_t *f70) {
f70ret_t r;
uint32_t requested = f70->size;
@@ -121,22 +202,17 @@ void ls_range(f70s1arg_t *f70) {
}
kos_lfn(f70, &r);
f70->offset += f70->size;
printf("status = %d, count = %d\n", r.status, r.count);
print_f70_status(&r, 1);
f70s1info_t *dir = f70->buf;
assert((r.status == F70_SUCCESS && r.count == f70->size) ||
(r.status == F70_END_OF_FILE && r.count < f70->size)
);
assert(r.count <= f70->size);
assert(dir->cnt == r.count);
if (dir->cnt != r.count ||
(r.status == F70_SUCCESS && r.count != f70->size) ||
(r.status == F70_END_OF_FILE && r.count >= f70->size)
) {
abort();
}
assert((r.status == F70_ERROR_SUCCESS && r.count == f70->size) ||
(r.status == F70_ERROR_END_OF_FILE && r.count < f70->size)
);
for (size_t i = 0; i < dir->cnt; i++) {
printf("%s\n", dir->bdfes[i].name);
}
if (r.status == F70_END_OF_FILE) {
if (r.status == F70_ERROR_END_OF_FILE) {
break;
}
}
@@ -146,20 +222,21 @@ void ls_all(f70s1arg_t *f70) {
f70ret_t r;
while (true) {
kos_lfn(f70, &r);
printf("status = %d, count = %d\n", r.status, r.count);
if (r.status != F70_SUCCESS && r.status != F70_END_OF_FILE) {
print_f70_status(&r, 1);
if (r.status != F70_ERROR_SUCCESS && r.status != F70_ERROR_END_OF_FILE) {
abort();
}
f70s1info_t *dir = f70->buf;
f70->offset += dir->cnt;
assert((r.status == F70_SUCCESS && r.count == f70->size) ||
(r.status == F70_END_OF_FILE && r.count < f70->size)
);
assert(r.count <= f70->size);
assert(dir->cnt == r.count);
assert((r.status == F70_ERROR_SUCCESS && r.count == f70->size) ||
(r.status == F70_ERROR_END_OF_FILE && r.count < f70->size)
);
for (size_t i = 0; i < dir->cnt; i++) {
printf("%s\n", dir->bdfes[i].name);
}
if (r.status == F70_END_OF_FILE) {
if (r.status == F70_ERROR_END_OF_FILE) {
break;
}
}
@@ -190,62 +267,12 @@ void kofu_stat(int argc, const char **argv) {
f70.buf = &file;
f70.path = argv[1];
kos_lfn(&f70, &r);
print_f70_status(&r, 0);
printf("attr: 0x%2.2x\n", file.attr);
printf("size: %llu\n", file.size);
return;
}
/*
void read_range(struct f70s0arg *f70) {
f70ret r;
hash_context ctx;
uint32_t requested = f70->size;
if (f70->size > MAX_BYTES_TO_READ) {
f70->size = MAX_BYTES_TO_READ;
}
for (; requested; requested -= f70->size) {
if (f70->size > requested) {
f70->size = requested;
}
kos_lfn(f70, &r);
f70->offset_lo += f70->size;
printf("status = %d, count = %d\n", r.status, r.count);
assert((r.status == F70_SUCCESS && r.count == f70->size) ||
(r.status == F70_END_OF_FILE && r.count < f70->size)
);
print_bytes(f70->buf, r.count);
hash_oneshot(&ctx, f70->buf, r.count);
print_hash(ctx.hash, HASH_SIZE);
if (r.status == F70_END_OF_FILE) {
break;
}
}
}
void read_all(struct f70s0arg *f70) {
f70ret r;
while (true) {
kos_lfn(f70, &r);
f70->offset_lo += f70->size;
printf("status = %d, count = %d\n", r.status, r.count);
assert((r.status == F70_SUCCESS && r.count == f70->size) ||
(r.status == F70_END_OF_FILE && r.count < f70->size)
);
if () {
print_bytes(f70->buf, r.count);
}
if () {
hash_context ctx;
hash_oneshot(&ctx, f70->buf, r.count);
print_hash(ctx.hash, HASH_SIZE);
}
if (r.status == F70_END_OF_FILE) {
break;
}
}
}
*/
void kofu_read(int argc, const char **argv) {
(void)argc;
f70s0arg_t f70 = {.sf = 0, .zero = 0};
@@ -274,9 +301,13 @@ void kofu_read(int argc, const char **argv) {
f70.buf = (uint8_t*)malloc(f70.count);
kos_lfn(&f70, &r);
assert((r.status == F70_SUCCESS && r.count == f70.count) ||
(r.status == F70_END_OF_FILE && r.count < f70.count));
assert(r.count <= f70.count);
assert((r.count == f70.count && r.status == F70_ERROR_SUCCESS) ||
(r.count < f70.count && r.status == F70_ERROR_END_OF_FILE)
);
print_f70_status(&r, 1);
if (dump_bytes)
print_bytes(f70.buf, r.count);
if (dump_hash)
@@ -286,17 +317,19 @@ void kofu_read(int argc, const char **argv) {
return;
}
struct func_table {
typedef struct {
char *name;
void (*func) (int, const char **);
};
} func_table_t;
struct func_table funcs[] = {
func_table_t funcs[] = {
{ "disk_add", kofu_disk_add },
{ "disk_del", kofu_disk_del },
{ "ls", kofu_ls },
{ "stat", kofu_stat },
{ "read", kofu_read },
{ "pwd", kofu_pwd },
{ "cd", kofu_cd },
{ NULL, NULL },
};
@@ -315,33 +348,31 @@ int main(int argc, char **argv) {
trace_begin();
}
kos_init();
// kos_disk_add(argv[1], "hd0");
// if (cio_init(argv[1])) {
// exit(1);
// }
//msg_file_not_found db 'file not found: '
const char **cargv = (const char**)malloc(sizeof(const char*) * (MAX_COMMAND_ARGS + 1));
while(next_line()) {
if (cmd_buf[0] == '#' || cmd_buf[0] == '\n') continue;
if (cmd_buf[0] == 'X') break;
if (!is_tty) {
prompt();
printf("%s", cmd_buf);
fflush(stdout);
}
const char **cargv = (const char**)malloc(sizeof(char*) * (MAX_COMMAND_ARGS + 1));
int cargc = split_args(cmd_buf, cargv);
bool found = false;
for (struct func_table *ft = funcs; ft->name != NULL; ft++) {
func_table_t *ft;
for (ft = funcs; ft->name != NULL; ft++) {
if (!strcmp(cargv[0], ft->name)) {
found = true;
ft->func(cargc, cargv);
cmd_num++;
break;
}
}
if (!found) {
if (ft->name) {
ft->func(cargc, cargv);
} else {
printf("unknown command: %s\n", cargv[0]);
}
}
free(cargv);
if (trace) {
trace_end();

View File

@@ -12,8 +12,8 @@ _free fix free
sys_msg_board equ _sys_msg_board
purge section,mov,add,sub
purge section,mov,add,sub
purge mov,add,sub
purge mov,add,sub
section '.text' executable align 16
coverage_begin:
@@ -32,6 +32,8 @@ include 'crc.inc'
include 'sha3.asm'
SLOT_BASE = os_base + 0x00080000
struct VDISK
File dd ?
SectCnt DQ ?
@@ -77,6 +79,25 @@ get_lwp_event_size:
ret
public kos_getcwd
proc kos_getcwd c uses ebx esi edi ebp, _buf, _len
mov eax, 30
mov ebx, 2
mov ecx, [_buf]
mov edx, [_len]
call sys_current_directory
ret
endp
public kos_cd
proc kos_cd c uses ebx esi edi ebp, _path
mov eax, 30
mov ebx, 1
mov ecx, [_path]
call sys_current_directory
ret
endp
public kos_time_to_epoch
proc kos_time_to_epoch c uses ebx esi edi ebp, _time
mov esi, [_time]
@@ -92,6 +113,15 @@ proc kos_init c
mov [pg_data.mem_amount], MEMORY_BYTES
mov [pg_data.pages_count], MEMORY_BYTES / PAGE_SIZE
mov [pg_data.pages_free], MEMORY_BYTES / PAGE_SIZE
mov dword[sysdir_name], 'sys'
mov dword[sysdir_path], 'HD0/'
mov word[sysdir_path+4], '1'
mov eax, SLOT_BASE
mov dword[current_slot], eax
mov word[cur_dir.path], '/'
mov [eax+APPDATA.cur_dir], cur_dir
ret
endp
@@ -379,3 +409,7 @@ ide_channel5_mutex MUTEX
ide_channel6_mutex MUTEX
ide_channel7_mutex MUTEX
ide_channel8_mutex MUTEX
os_base rb 0x100000
cur_dir:
.encoding rb 1
.path rb maxPathLength

View File

@@ -12,19 +12,19 @@ enum {
};
typedef enum {
F70_SUCCESS,
F70_DISK_BASE,
F70_UNSUPPORTED_FS,
F70_UNKNOWN_FS,
F70_PARTITION,
F70_FILE_NOT_FOUND,
F70_END_OF_FILE,
F70_MEMORY_POINTER,
F70_DISK_FULL,
F70_FS_FAIL,
F70_ACCESS_DENIED,
F70_DEVICE,
F70_OUT_OF_MEMORY,
F70_ERROR_SUCCESS,
F70_ERROR_DISK_BASE,
F70_ERROR_UNSUPPORTED_FS,
F70_ERROR_UNKNOWN_FS,
F70_ERROR_PARTITION,
F70_ERROR_FILE_NOT_FOUND,
F70_ERROR_END_OF_FILE,
F70_ERROR_MEMORY_POINTER,
F70_ERROR_DISK_FULL,
F70_ERROR_FS_FAIL,
F70_ERROR_ACCESS_DENIED,
F70_ERROR_DEVICE,
F70_ERROR_OUT_OF_MEMORY,
} f70status;
typedef struct {
@@ -99,6 +99,8 @@ void kos_init(void);
void kos_lfn(void *f70sXarg, f70ret_t *r);
void *kos_disk_add(const char *file_name, const char *disk_name);
int kos_disk_del(const char *name);
uint32_t kos_getcwd(char *buf, uint32_t len);
void kos_cd(const char *buf);
//void hash_init(void *ctx);
//void hash_update(void *ctx, void *data, size_t len);

View File

@@ -1,14 +1,14 @@
#0> disk_add ../img/s512_xfs_v4_ftype0.img hd0
/> disk_add ../img/s512_xfs_v4_ftype0.img hd0
/hd0/1: xfs
#1> ls /hd0/1/sf
status = 6, count = 5
/> ls /hd0/1/sf
status = 6 end_of_file, count = 5
.
..
d0000000000_
d0000000001_x
d0000000002_xx
#2> ls /hd0/1/block
status = 6, count = 22
/> ls /hd0/1/block
status = 6 end_of_file, count = 22
.
..
d0000000000_
@@ -31,8 +31,8 @@ d0000000016_xxxxxxxxxxxxxxxx
d0000000017_xxxxxxxxxxxxxxxxx
d0000000018_xxxxxxxxxxxxxxxxxx
d0000000019_xxxxxxxxxxxxxxxxxxx
#3> ls /hd0/1/leaf
status = 6, count = 72
/> ls /hd0/1/leaf
status = 6 end_of_file, count = 72
.
..
d0000000000_
@@ -105,7 +105,7 @@ d0000000066_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000067_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000068_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000069_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#4> ls /hd0/1/node
/> ls /hd0/1/node
status = 0, count = 100
.
..
@@ -611,7 +611,7 @@ d0000000478_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000479_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000480_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000481_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
status = 6, count = 22
status = 6 end_of_file, count = 22
d0000000482_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000483_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000484_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -634,7 +634,7 @@ d0000000516_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000517_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000518_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000519_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#5> ls /hd0/1/btree
/> ls /hd0/1/btree
status = 0, count = 100
.
..
@@ -1241,7 +1241,7 @@ d0000000594_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000595_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000596_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000597_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
status = 6, count = 2
status = 6 end_of_file, count = 2
d0000000598_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000599_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#6> disk_del hd0
/> disk_del hd0

View File

@@ -1,14 +1,14 @@
#0> disk_add ../img/s512_xfs_v4_ftype1.img hd0
/> disk_add ../img/s512_xfs_v4_ftype1.img hd0
/hd0/1: xfs
#1> ls /hd0/1/sf
status = 6, count = 5
/> ls /hd0/1/sf
status = 6 end_of_file, count = 5
.
..
d0000000000_
d0000000001_x
d0000000002_xx
#2> ls /hd0/1/block
status = 6, count = 22
/> ls /hd0/1/block
status = 6 end_of_file, count = 22
.
..
d0000000000_
@@ -31,8 +31,8 @@ d0000000016_xxxxxxxxxxxxxxxx
d0000000017_xxxxxxxxxxxxxxxxx
d0000000018_xxxxxxxxxxxxxxxxxx
d0000000019_xxxxxxxxxxxxxxxxxxx
#3> ls /hd0/1/leaf
status = 6, count = 72
/> ls /hd0/1/leaf
status = 6 end_of_file, count = 72
.
..
d0000000000_
@@ -105,7 +105,7 @@ d0000000066_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000067_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000068_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000069_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#4> ls /hd0/1/node
/> ls /hd0/1/node
status = 0, count = 100
.
..
@@ -611,7 +611,7 @@ d0000000476_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000477_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000478_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000479_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
status = 6, count = 22
status = 6 end_of_file, count = 22
d0000000480_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000481_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000482_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -634,7 +634,7 @@ d0000000516_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000517_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000518_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000519_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#5> ls /hd0/1/btree
/> ls /hd0/1/btree
status = 0, count = 100
.
..
@@ -1241,7 +1241,7 @@ d0000000594_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000595_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000596_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000597_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
status = 6, count = 2
status = 6 end_of_file, count = 2
d0000000598_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000599_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#6> disk_del hd0
/> disk_del hd0

View File

@@ -1,14 +1,14 @@
#0> disk_add ../img/s512_xfs_v4_ftype0_b4k_n2b.img hd0
/> disk_add ../img/s512_xfs_v4_ftype0_b4k_n2b.img hd0
/hd0/1: xfs
#1> ls /hd0/1/sf
status = 6, count = 5
/> ls /hd0/1/sf
status = 6 end_of_file, count = 5
.
..
d0000000000_
d0000000001_x
d0000000002_xx
#2> ls /hd0/1/block
status = 6, count = 22
/> ls /hd0/1/block
status = 6 end_of_file, count = 22
.
..
d0000000000_
@@ -31,8 +31,8 @@ d0000000016_xxxxxxxxxxxxxxxx
d0000000017_xxxxxxxxxxxxxxxxx
d0000000018_xxxxxxxxxxxxxxxxxx
d0000000019_xxxxxxxxxxxxxxxxxxx
#3> ls /hd0/1/leaf
status = 6, count = 72
/> ls /hd0/1/leaf
status = 6 end_of_file, count = 72
.
..
d0000000000_
@@ -105,7 +105,7 @@ d0000000066_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000067_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000068_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000069_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#4> ls /hd0/1/node
/> ls /hd0/1/node
status = 0, count = 100
.
..
@@ -611,7 +611,7 @@ d0000000486_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000487_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000496_xxxxxxxx
d0000000497_xxxxxxxxx
status = 6, count = 22
status = 6 end_of_file, count = 22
d0000000498_xxxxxxxxxx
d0000000499_xxxxxxxxxxx
d0000000500_xxxxxxxxxxxx
@@ -634,7 +634,7 @@ d0000000516_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000517_xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000518_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000519_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#5> ls /hd0/1/btree
/> ls /hd0/1/btree
status = 0, count = 100
.
..
@@ -1241,7 +1241,7 @@ d0000000594_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000595_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000596_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000597_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
status = 6, count = 2
status = 6 end_of_file, count = 2
d0000000598_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
d0000000599_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#6> disk_del hd0
/> disk_del hd0

View File

@@ -1,4 +0,0 @@
#0> disk_add ../img/s512_xfs_v4_files.img hd0
/hd0/1: xfs
#1> read /hd0/1/no_hole 0 2 -b
0001

View File

@@ -0,0 +1,353 @@
/> disk_add ../img/s512_xfs_v4_files_b4k_n2b.img hd0
/hd0/1: xfs
/> read /hd0/1/no_hole 0 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0 1 -b
status = 0, count = 1
00
/> read /hd0/1/no_hole 0 2 -b
status = 0, count = 2
0001
/> read /hd0/1/no_hole 0 3 -b
status = 0, count = 3
000102
/> read /hd0/1/no_hole 0 4 -b
status = 0, count = 4
00010203
/> read /hd0/1/no_hole 0 5 -b
status = 0, count = 5
0001020304
/> read /hd0/1/no_hole 0 6 -b
status = 0, count = 6
000102030405
/> read /hd0/1/no_hole 0 7 -b
status = 0, count = 7
00010203040506
/> read /hd0/1/no_hole 0 8 -b
status = 0, count = 8
0001020304050607
/> read /hd0/1/no_hole 1 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 1 1 -b
status = 0, count = 1
01
/> read /hd0/1/no_hole 1 2 -b
status = 0, count = 2
0102
/> read /hd0/1/no_hole 1 3 -b
status = 0, count = 3
010203
/> read /hd0/1/no_hole 1 4 -b
status = 0, count = 4
01020304
/> read /hd0/1/no_hole 1 5 -b
status = 0, count = 5
0102030405
/> read /hd0/1/no_hole 1 6 -b
status = 0, count = 6
010203040506
/> read /hd0/1/no_hole 1 7 -b
status = 0, count = 7
01020304050607
/> read /hd0/1/no_hole 1 8 -b
status = 0, count = 8
0102030405060708
/> read /hd0/1/no_hole 4093 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 4093 1 -b
status = 0, count = 1
0f
/> read /hd0/1/no_hole 4093 2 -b
status = 0, count = 2
0ffe
/> read /hd0/1/no_hole 4093 3 -b
status = 0, count = 3
0ffe0f
/> read /hd0/1/no_hole 4093 4 -b
status = 0, count = 4
0ffe0f00
/> read /hd0/1/no_hole 4093 5 -b
status = 0, count = 5
0ffe0f0010
/> read /hd0/1/no_hole 4093 6 -b
status = 0, count = 6
0ffe0f001002
/> read /hd0/1/no_hole 4093 7 -b
status = 0, count = 7
0ffe0f00100210
/> read /hd0/1/no_hole 4093 8 -b
status = 0, count = 8
0ffe0f0010021004
/> read /hd0/1/no_hole 4094 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 4094 1 -b
status = 0, count = 1
fe
/> read /hd0/1/no_hole 4094 2 -b
status = 0, count = 2
fe0f
/> read /hd0/1/no_hole 4094 3 -b
status = 0, count = 3
fe0f00
/> read /hd0/1/no_hole 4094 4 -b
status = 0, count = 4
fe0f0010
/> read /hd0/1/no_hole 4094 5 -b
status = 0, count = 5
fe0f001002
/> read /hd0/1/no_hole 4094 6 -b
status = 0, count = 6
fe0f00100210
/> read /hd0/1/no_hole 4094 7 -b
status = 0, count = 7
fe0f0010021004
/> read /hd0/1/no_hole 4094 8 -b
status = 0, count = 8
fe0f001002100410
/> read /hd0/1/no_hole 4095 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 4095 1 -b
status = 0, count = 1
0f
/> read /hd0/1/no_hole 4095 2 -b
status = 0, count = 2
0f00
/> read /hd0/1/no_hole 4095 3 -b
status = 0, count = 3
0f0010
/> read /hd0/1/no_hole 4095 4 -b
status = 0, count = 4
0f001002
/> read /hd0/1/no_hole 4095 5 -b
status = 0, count = 5
0f00100210
/> read /hd0/1/no_hole 4095 6 -b
status = 0, count = 6
0f0010021004
/> read /hd0/1/no_hole 4095 7 -b
status = 0, count = 7
0f001002100410
/> read /hd0/1/no_hole 4095 8 -b
status = 0, count = 8
0f00100210041006
/> read /hd0/1/no_hole 4096 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 4096 1 -b
status = 0, count = 1
00
/> read /hd0/1/no_hole 4096 2 -b
status = 0, count = 2
0010
/> read /hd0/1/no_hole 4096 3 -b
status = 0, count = 3
001002
/> read /hd0/1/no_hole 4096 4 -b
status = 0, count = 4
00100210
/> read /hd0/1/no_hole 4096 5 -b
status = 0, count = 5
0010021004
/> read /hd0/1/no_hole 4096 6 -b
status = 0, count = 6
001002100410
/> read /hd0/1/no_hole 4096 7 -b
status = 0, count = 7
00100210041006
/> read /hd0/1/no_hole 4096 8 -b
status = 0, count = 8
0010021004100610
/> read /hd0/1/no_hole 4097 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 4097 1 -b
status = 0, count = 1
10
/> read /hd0/1/no_hole 4097 2 -b
status = 0, count = 2
1002
/> read /hd0/1/no_hole 4097 3 -b
status = 0, count = 3
100210
/> read /hd0/1/no_hole 4097 4 -b
status = 0, count = 4
10021004
/> read /hd0/1/no_hole 4097 5 -b
status = 0, count = 5
1002100410
/> read /hd0/1/no_hole 4097 6 -b
status = 0, count = 6
100210041006
/> read /hd0/1/no_hole 4097 7 -b
status = 0, count = 7
10021004100610
/> read /hd0/1/no_hole 4097 8 -b
status = 0, count = 8
1002100410061008
/> read /hd0/1/no_hole 0xfffd 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0xfffd 1 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 2 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 3 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 4 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 5 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 6 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 7 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffd 8 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0xfffe 1 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 2 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 3 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 4 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 5 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 6 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 7 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xfffe 8 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0xffff 1 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 2 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 3 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 4 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 5 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 6 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 7 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0xffff 8 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0x10000 1 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 2 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 3 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 4 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 5 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 6 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 7 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000 8 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0x10001 1 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 2 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 3 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 4 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 5 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 6 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 7 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10001 8 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 0 -b
status = 0, count = 0
/> read /hd0/1/no_hole 0x10000000 1 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 2 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 3 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 4 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 5 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 6 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 7 -b
status = 6 end_of_file, count = 0
/> read /hd0/1/no_hole 0x10000000 8 -b
status = 6 end_of_file, count = 0

View File

@@ -0,0 +1,131 @@
disk_add ../img/s512_xfs_v4_files_b4k_n2b.img hd0
read /hd0/1/no_hole 0 0 -b
read /hd0/1/no_hole 0 1 -b
read /hd0/1/no_hole 0 2 -b
read /hd0/1/no_hole 0 3 -b
read /hd0/1/no_hole 0 4 -b
read /hd0/1/no_hole 0 5 -b
read /hd0/1/no_hole 0 6 -b
read /hd0/1/no_hole 0 7 -b
read /hd0/1/no_hole 0 8 -b
read /hd0/1/no_hole 1 0 -b
read /hd0/1/no_hole 1 1 -b
read /hd0/1/no_hole 1 2 -b
read /hd0/1/no_hole 1 3 -b
read /hd0/1/no_hole 1 4 -b
read /hd0/1/no_hole 1 5 -b
read /hd0/1/no_hole 1 6 -b
read /hd0/1/no_hole 1 7 -b
read /hd0/1/no_hole 1 8 -b
read /hd0/1/no_hole 4093 0 -b
read /hd0/1/no_hole 4093 1 -b
read /hd0/1/no_hole 4093 2 -b
read /hd0/1/no_hole 4093 3 -b
read /hd0/1/no_hole 4093 4 -b
read /hd0/1/no_hole 4093 5 -b
read /hd0/1/no_hole 4093 6 -b
read /hd0/1/no_hole 4093 7 -b
read /hd0/1/no_hole 4093 8 -b
read /hd0/1/no_hole 4094 0 -b
read /hd0/1/no_hole 4094 1 -b
read /hd0/1/no_hole 4094 2 -b
read /hd0/1/no_hole 4094 3 -b
read /hd0/1/no_hole 4094 4 -b
read /hd0/1/no_hole 4094 5 -b
read /hd0/1/no_hole 4094 6 -b
read /hd0/1/no_hole 4094 7 -b
read /hd0/1/no_hole 4094 8 -b
read /hd0/1/no_hole 4095 0 -b
read /hd0/1/no_hole 4095 1 -b
read /hd0/1/no_hole 4095 2 -b
read /hd0/1/no_hole 4095 3 -b
read /hd0/1/no_hole 4095 4 -b
read /hd0/1/no_hole 4095 5 -b
read /hd0/1/no_hole 4095 6 -b
read /hd0/1/no_hole 4095 7 -b
read /hd0/1/no_hole 4095 8 -b
read /hd0/1/no_hole 4096 0 -b
read /hd0/1/no_hole 4096 1 -b
read /hd0/1/no_hole 4096 2 -b
read /hd0/1/no_hole 4096 3 -b
read /hd0/1/no_hole 4096 4 -b
read /hd0/1/no_hole 4096 5 -b
read /hd0/1/no_hole 4096 6 -b
read /hd0/1/no_hole 4096 7 -b
read /hd0/1/no_hole 4096 8 -b
read /hd0/1/no_hole 4097 0 -b
read /hd0/1/no_hole 4097 1 -b
read /hd0/1/no_hole 4097 2 -b
read /hd0/1/no_hole 4097 3 -b
read /hd0/1/no_hole 4097 4 -b
read /hd0/1/no_hole 4097 5 -b
read /hd0/1/no_hole 4097 6 -b
read /hd0/1/no_hole 4097 7 -b
read /hd0/1/no_hole 4097 8 -b
read /hd0/1/no_hole 0xfffd 0 -b
read /hd0/1/no_hole 0xfffd 1 -b
read /hd0/1/no_hole 0xfffd 2 -b
read /hd0/1/no_hole 0xfffd 3 -b
read /hd0/1/no_hole 0xfffd 4 -b
read /hd0/1/no_hole 0xfffd 5 -b
read /hd0/1/no_hole 0xfffd 6 -b
read /hd0/1/no_hole 0xfffd 7 -b
read /hd0/1/no_hole 0xfffd 8 -b
read /hd0/1/no_hole 0xfffe 0 -b
read /hd0/1/no_hole 0xfffe 1 -b
read /hd0/1/no_hole 0xfffe 2 -b
read /hd0/1/no_hole 0xfffe 3 -b
read /hd0/1/no_hole 0xfffe 4 -b
read /hd0/1/no_hole 0xfffe 5 -b
read /hd0/1/no_hole 0xfffe 6 -b
read /hd0/1/no_hole 0xfffe 7 -b
read /hd0/1/no_hole 0xfffe 8 -b
read /hd0/1/no_hole 0xffff 0 -b
read /hd0/1/no_hole 0xffff 1 -b
read /hd0/1/no_hole 0xffff 2 -b
read /hd0/1/no_hole 0xffff 3 -b
read /hd0/1/no_hole 0xffff 4 -b
read /hd0/1/no_hole 0xffff 5 -b
read /hd0/1/no_hole 0xffff 6 -b
read /hd0/1/no_hole 0xffff 7 -b
read /hd0/1/no_hole 0xffff 8 -b
read /hd0/1/no_hole 0x10000 0 -b
read /hd0/1/no_hole 0x10000 1 -b
read /hd0/1/no_hole 0x10000 2 -b
read /hd0/1/no_hole 0x10000 3 -b
read /hd0/1/no_hole 0x10000 4 -b
read /hd0/1/no_hole 0x10000 5 -b
read /hd0/1/no_hole 0x10000 6 -b
read /hd0/1/no_hole 0x10000 7 -b
read /hd0/1/no_hole 0x10000 8 -b
read /hd0/1/no_hole 0x10001 0 -b
read /hd0/1/no_hole 0x10001 1 -b
read /hd0/1/no_hole 0x10001 2 -b
read /hd0/1/no_hole 0x10001 3 -b
read /hd0/1/no_hole 0x10001 4 -b
read /hd0/1/no_hole 0x10001 5 -b
read /hd0/1/no_hole 0x10001 6 -b
read /hd0/1/no_hole 0x10001 7 -b
read /hd0/1/no_hole 0x10001 8 -b
read /hd0/1/no_hole 0x10000000 0 -b
read /hd0/1/no_hole 0x10000000 1 -b
read /hd0/1/no_hole 0x10000000 2 -b
read /hd0/1/no_hole 0x10000000 3 -b
read /hd0/1/no_hole 0x10000000 4 -b
read /hd0/1/no_hole 0x10000000 5 -b
read /hd0/1/no_hole 0x10000000 6 -b
read /hd0/1/no_hole 0x10000000 7 -b
read /hd0/1/no_hole 0x10000000 8 -b

View File

@@ -1,5 +0,0 @@
#0> disk_add ../img/s512_xfs_v4_files.img hd0
/hd0/1: xfs
#1> stat /hd0/1/no_hole
attr: 0x00
size: 65536

6
test/004_sf705_stat.ref Normal file
View File

@@ -0,0 +1,6 @@
/> disk_add ../img/s512_xfs_v4_files.img hd0
/hd0/1: xfs
/> stat /hd0/1/no_hole
status = 0
attr: 0x00
size: 65536

10
test/005_f30_cur_dir.ref Normal file
View File

@@ -0,0 +1,10 @@
/> disk_add ../img/s512_xfs_v4_files.img hd0
/hd0/1: xfs
/> pwd
/
/> cd /hd0
hd0> pwd
/hd0
hd0> cd 1
1> pwd
/hd0/1

View File

@@ -1,2 +1,6 @@
disk_add ../img/s512_xfs_v4_files.img hd0
read /hd0/1/no_hole 0 2 -b
pwd
cd /hd0
pwd
cd 1
pwd

View File

@@ -1,12 +1,16 @@
KOFU=../kofu
sf700_tests := $(addsuffix .out, $(basename $(wildcard *_700_*.t)))
sf701_tests := $(addsuffix .out, $(basename $(wildcard *_701_*.t)))
sf705_tests := $(addsuffix .out, $(basename $(wildcard *_705_*.t)))
f30_tests := $(addsuffix .out, $(basename $(wildcard ???_f30_*.t)))
all: f70
sf700_tests := $(addsuffix .out, $(basename $(wildcard ???_sf700_*.t)))
sf701_tests := $(addsuffix .out, $(basename $(wildcard ???_sf701_*.t)))
sf705_tests := $(addsuffix .out, $(basename $(wildcard ???_sf705_*.t)))
all: f30 f70
@echo all test passed
f30: $(f30_tests)
f70: sf700 sf701 sf705
sf700: $(sf700_tests)
sf701: $(sf701_tests)