diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c b/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c index a4d4fc3597..f2d2719561 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/cache.c @@ -1739,7 +1739,7 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz { size_t err = 0; cache_ent *ce; - cache_ent_list *cel; + cache_ent_list *cel = NULL; if (chatty_io > 1) printf("cbio: bnum = %Ld, num_blocks = %Ld, bsize = %d, op = %s\n", bnum, num_blocks, @@ -1772,7 +1772,9 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz dev, bnum, num_blocks, max_device_blocks[dev]); // let the app crash here - *(int *)0x3100 = 0xc0debabe; + debugger("Accessed blocks out of device range!"); + //*(int *)0x3100 = 0xc0debabe; + return EINVAL; } @@ -1787,7 +1789,6 @@ cache_block_io(int dev, fs_off_t bnum, void *data, fs_off_t num_blocks, int bsiz panic("*** asked to do a large locked io that's too hard!\n"); } - if (op & CACHE_READ) { if (read_phys_blocks(dev, bnum, data, num_blocks, bsize) != 0) { printf("cache read:read_phys_blocks failed (%s on blocks %Ld:%Ld)!\n", diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/rootfs.c b/src/tests/add-ons/kernel/file_systems/fs_shell/rootfs.c index 6741d079b2..b04bdff106 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/rootfs.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/rootfs.c @@ -656,7 +656,7 @@ rootfs_readdir(void *_ns, void *_node, void *_cookie, long *num, long i; vnode *vn; vnode_id vnid; - char *name, *last; + char *name, *last = ""; int sl, rl; ns = (nspace *) _ns; diff --git a/src/tests/add-ons/kernel/file_systems/fs_shell/sl.c b/src/tests/add-ons/kernel/file_systems/fs_shell/sl.c index 8713bab936..8e6af4656a 100644 --- a/src/tests/add-ons/kernel/file_systems/fs_shell/sl.c +++ b/src/tests/add-ons/kernel/file_systems/fs_shell/sl.c @@ -159,7 +159,7 @@ int InsertSL(SkipList l, void *key) { register int i,k; SLNode update[MaxNumberOfLevels]; - register SLNode p,q; + register SLNode p,q = 0; int (*compare)() = l->compare; p = l->header; @@ -262,7 +262,7 @@ int DeleteSL(SkipList l, void *key) void *SearchSL(SkipList l, void *key) { register int k; - register SLNode p,q; + register SLNode p,q = 0; int (*compare)() = l->compare; p = l->header;