Good Night,
First of all, what is VFS? VFS means Virtual File System. It is a layer that exists in a lot of OS and in Minix too, this layer takes care of the communication with the File System. It is a Master’s thesis in Computer Science from Balázs Gerófi and the name is “Design and implementation of the MINIX Virtual File system“.
But why to communicate with VFS server? Or why to add something on it? If you want to some tasks you need to do a SYSCALL to it. But sometimes the VFS server don’t do what you want. So you must add and change it to do it.
How to do this?
Edit “/usr/src/include/minix/callnr.h”. After this line “#define GETPGRP 63″ add this:
[code lang=”c”]
#define TESTCALL 64
[/code]
Then you need to change the VFS server and add what you want to do when it is called. Edit “/usr/src/servers/vfs/table.c”. You should replace the line “no_sys, /* 64 = unused */” with:
[code lang=”c”]
do_TESTCALL, /* 64 = unused */
[/code]
What happens? The method do_TESTCALL will be called when a syscall with number 64 is done.
Change the “/usr/src/servers/vfs/proto.h”. Add this:
[code lang=”c”]
/* do_TESTCALL EXAMPLE */
_PROTOTYPE( int do_TESTCALL, (void) );
[/code]
Now you have to create the method in “/usr/src/servers/vfs/read.c” (I did in this file and it worked). Add this:
[code lang=”c”]
/*===========================================================================*
*Trabalho: do_ver_contig *
*===========================================================================*/
PUBLIC int do_TESTCALL() {
message m;
printf(“Number received %d”, m_in.fd);
}
[/code]
But how to execute? How this works? How to compile?
Acess “/usr/src/tools/” and execute:
$ make libraries
(This process can take a long time)
In “/usr/src/tools” execute:
$ make hdboot
Reboot.
How to test and see if it is working? Create in your “/root” a file with this:
[code lang=”c”]
#include
#include
#include
int main(int argc, char *argv[]) {
int fd = 2;
message m;
m.m1_i1 = fd;
printf(“Number: %d”, fd);
_syscall(FS, 64, &m);
}
[/code]
Compile it, execute it and done!
This file do a _syscall to FS saying to execute method 64 and send by message the number 2. So the do_TESTCALL receive the parameter and show it on screen. Yes it is simple, but it is just an example about how to work with VFS server.
Example of code changed/add to VFS server
Creating a system library in Minix.
Best Regards,
Matheus
PS: It is a silly example, but it just show how to add some method to VFS Server. Probably in the next days I will show a real example.
polskie kasyno kryptowaluty
My webpage – grać W darmowe automaty do gier (https://Prostandard.pl/jak-hrat-nejnovejsi-online-hraci-Automaty-a-pouzivat-na-ne-triky-v-2026/)
I know this is not exactly on topic, but i have a blog using the blogengine platform as well and i’m having issues with my comments displaying. is there a setting i am forgetting? maybe you could help me out? thank you.
Just stumble upon your blog from from time to time. nice article
Na 888starz siedze juz z pare miesiecy i tak sobie pomyslalem, ze rzuce tu pare slow. Szczerze mowiac — zapisalem sie glownie dla bonusu i nie zaluje. U nas w Polsce nie ma zbyt wielu porzadnych miejscowek, wiec cos takiego od razu testuje na spokojnie.
Przede wszystkim krece sloty i wybor jest ogromny. Jest chyba z trzy tys. automatow, poczawszy od Pragmatic Play po NetEnt, Play’n GO oraz Yggdrasil. Sztampowe Sweet Bonanza i Book of Dead sa na wyciagniecie reki, ale prawde mowiac zwykle wracam do paru swoich tytulow. Ladowanie nie tnie na mobilce.
Dla tych co lubia prawdziwego krupiera — obsluguje to Evolution, z prawdziwymi krupierami, a jeszcze te cale teleturnieje w stylu Crazy Time. Zjada czas niesamowicie. Wplaty i wyplaty — wrzucalem przez BLIK-a i crypto, da sie tez Mastercard. Pierwszy cashout dostalem po jakichs kilka godzin, Skrillem sa najszybsze. Jesli komus zalezy na swieze oferty u 888starz aviator zanim sie zapiszesz, bo sie zmieniaja.
Powitalny prezentuje sie przyzwoicie — jest spory procent od wplaty i do tego jakies 150 zakrecen. Wager wynosi x40, i to szczerze w normie, choc jak zawsze trzeba przeczytac warunki. Minimalny depozyt to grosze, zapis trwala jakies dwie minuty. Apka mobilna istnieje bez wiekszych zgrzytow, instalka poza sklepem ze strony.
Zeby nie bylo za rozowo — czat potrafi kaze czekac, szczegolnie w nocy. Sprawdzanie dokumentow tez mnie wkurzyla, ale widocznie z powodu licencji inaczej sie nie da. Ogolnie — 888starz mi pasuje, opinie na forach sa rozne, dlatego wyrob sobie wlasne, zanim wrzucisz kase.