[Kos-cvs] [kos] Modification CVS par d2

KOS CVS kos-dev <kos-dev@enix.org>
Sun, 17 Aug 2003 21:54:07 +0200 (CEST)


Module :	kos
Modifié par :	d2	17/08/03 21:54:07

Fichiers modifiés :
	.              : MkVars 
	modules        : Makefile 
	modules/debug  : bochs.c debug.c debug.h disasm.c disasm.h 
	                 serial.c 
	modules/fs     : Makefile 
	modules/idt    : _exception.c 
	modules/karm   : Makefile fs_support.c fs_support.h interface.h 
	                 karm.c karm.h kres.c kres.h mount.c open.c 
	                 ures.c ures.h view.h 
	modules/karm/interface: block.h char.h dir.h file.h mapping.h 
	modules/kmem   : _kslab_cache_create.c _kslab_init.c 
	modules/kos    : errno.h 
	modules/lib    : Makefile libcmdline.c snprintf.c stdio.h 
	                 strcat.c strcpy.c string.h 
	modules/liblist: liblist.h 
	modules/task   : _task_kthread.c _task_uthread.c 
	modules/tty    : _tty.c _tty_kres.c 
	modules/vmm    : _vmm_kmem.c 
Fichiers ajoutés :
	.              : ChangeLog 
	modules/fs/devfs: Makefile devfs.c devfs.h 
	modules/fs/fakefs: Makefile fakefs.c 
	modules/karm   : interface.c view.c 
Fichiers enlevés :
	modules/karm   : devfs.c devfs.h fakefs.c 
	modules/lib    : sprintf.c 

Détails :
2003-08-17  David  <d2@bingo>

* all: Improvment to the kres/ures model : kres/view/ures.
Removal of dangerous string functions.

* modules/lib/*: Removed strcpy, strncpy, strcat, strncat, sprintf
and vsprintf. We can use only strzcpy, strzcat and snprintf (they
all make sure that everything fits in the buffer and that the
resulting string is null-terminated)

* modules/liblist/liblist.h: list_init now renamed list_singleton
(initialize a list to a given single element). list_init simply
initializes a empty list.

* modules/karm/fs_support.c: All functions return result_t.

* modules/vmm/_vmm_kmem.c: Updated to the new model.

* modules/tty/_tty_kres.c: Updated to the new model.

* modules/fs/fakefs/fakefs.c, modules/fs/devfs/devfs.c: Moved from
karm to their own modules + updated to the new model.

* modules/karm/interface.c: Global repository of interfaces (name,
number of operations, number of args for each operation)

* modules/karm/ures.h: User ressource now only contains a back
pointer to the view.

* modules/karm/view.h: A view now contains two function pointers :
init_ures and cleanup_ures, and also contains a pointer to private
data that concerns the kres for the current interface. User
ressource are now being listed by views (and not by kernel
ressource anymore).

* modules/karm/kres.h: A kernel ressource is now simply a list of
views.

* modules/karm/kres.c : New set of functions : kres_lookup_view,
kres_add_view, kres_remove_view. We can now add views dynamically.

Compile, mais pas teste.