Re: [PATCH 2/7] Mini-OS: add concept of mount points

2023-02-06 Thread Juergen Gross
On 05.02.23 13:45, Samuel Thibault wrote: Juergen Gross, le ven. 03 févr. 2023 10:18:04 +0100, a ecrit: +int open(const char *pathname, int flags, ...) +{ +unsigned int m, mlen; +struct mount_point *mnt; +mode_t mode = 0; +va_list ap; + +if ( flags & O_CREAT ) +{ +

Re: [PATCH 2/7] Mini-OS: add concept of mount points

2023-02-05 Thread Samuel Thibault
Juergen Gross, le ven. 03 févr. 2023 10:18:04 +0100, a ecrit: > +int open(const char *pathname, int flags, ...) > +{ > +unsigned int m, mlen; > +struct mount_point *mnt; > +mode_t mode = 0; > +va_list ap; > + > +if ( flags & O_CREAT ) > +{ > +va_start(ap, flags); > +

Re: [PATCH 2/7] Mini-OS: add concept of mount points

2023-02-05 Thread Samuel Thibault
Juergen Gross, le ven. 03 févr. 2023 10:18:04 +0100, a ecrit: > Add the concept of mount points to Mini-OS. A mount point is a path > associated with a device pointer and an open() callback. A mount point > can be either a file (e.g. "/dev/mem") or a directory ("/var/log"). > > This allows to repl

[PATCH 2/7] Mini-OS: add concept of mount points

2023-02-03 Thread Juergen Gross
Add the concept of mount points to Mini-OS. A mount point is a path associated with a device pointer and an open() callback. A mount point can be either a file (e.g. "/dev/mem") or a directory ("/var/log"). This allows to replace the special casing in the generic open() handling with a generic mou