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.
Thanks for sharing your thoughts. I really appreciate your efforts and I will be waiting for your next post thank you once again.
https://teletype.in/@avtobloggerua/B8-lsvQ4Hyu
united statesn online casino free spins sign up, united
kingdom online casino free chip and bet365 what games to Play in casino new zealandn roulette online uk,
or united statesn online poker
free bets on grand national
Here is my web page; tips for greyhound racing (grayhound-betting.com)
how to place a bet on a horse race online
My blog post when does the english greyhound Derby start
horse racing betting combinations explained
Feel free to surf to my site – dog results at monmore
online racecard
My web-site greyhound derby heat Betting
Great delivery. Solid arguments. Keep up the good spirit.
Visit my web-site: greyhound betting sites (Wilfred)
cheltenham triumph hurdle betting
Check out my page last Night’s greyhound derby results
casino gananoque ontario united kingdom, united kingdom online casino free bonus
no deposit required and Most Popular Pokie Machines reliable online casino australia, or best uk casino offers
best betting odds grand national
Look at my blog: dog racing today results
how much is a boxed trifecta bet
Here is my webpage … https://Grayhound-Betting.Com/
top sportwetten tipico live wetten basketball [Jett]
royal ascot betting tips tuesday
Look into my web site :: uk dog racing results today (grayhound-betting.com)
pokies return rate canada, new usa gambling sites and free bonus no deposit
roulette usa, or bet365 united statesn roulette betting
Here is my web page :: blackjack 21 blackjackist apk download (Joie)
pferderennen mannheim wetten
Feel free to visit my web page basketball nba Wett tipps, basketball-wetten.com,
best betting odds horse is dog racing legal in the uk (bukmacherjakie.com)
new horse race betting sites
my homepage – sheffield dogs results – Julissa,
5$ deposit casino canada, real money australian online pokies and new united states online how do you play casino roulette (Adriene) games, or are there pokies in western new zealand
betting on a horse race
My web page: https://grayhound-betting.com/
windsor racing results today
Also visit my page Fast Result Greyhound
offshore horse racing betting sites
Feel free to surf to my site; Greyhound derby 2026 draw
cheltenham races bets today
My web-site … https://grayhound-Betting.Com/
racing yesterday greyhounds results (Lyle) at wolverhampton today
tips on betting on horse racing
Here is my homepage; https://grayhound-betting.com/
sports bet box trifecta
Here is my blog … dog racing results for today (Mohamed)
https://justpaste.me/Clve4
live horse racing online betting
My web site … https://horse-betting.com/
best horse to bet on grand national
my site; betting King george
wette deutschland schottland
Also visit my site … basketball wetten tips; https://basketball-wetten.com/,
horse romford Dog racing tips tips and best bets
bookies free bets cheltenham
my web blog – https://horse-Betting.com/
casino winnings taxable in united kingdom, pokies online
free united states and can you play poker for money online in united kingdom, or deposit 10 play with 50 slots uk
Here is my site: bingofit 905 hr instructions – Zara,
bet online with the leader what’s sp in horse Betting
(https://horse-betting.com/)
online horse racing
Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.com/hu/register-person?ref=IQY5TET4
southwell race results yesterday
Check out my blog … scottish grand national 2026 betting odds,
Penelope,
horse racing betting tips today
Also visit my web site grand national 2026 place a Bet
https://poppersme.wordpress.com/
cheltenham horse racing winners betting for ascot today,
basketball-wetten.com,
canadian approved online casinos, casino 2021 no deposit uk and online
slot jack casino revenue (Desiree) uk,
or usa online casinos free play
racing results at windsor tonight
Also visit my web blog; put a bet on the grand national
[Ferdinand]
easy odds horse racing results at lingfield today (Basketball-wetten.Com) racing betting
betting sites to watch horse racing betting app uk, Charlene, racing
new horse racing bookmakers uk
My web blog: https://horse-betting.com/
https://macuisineturque.fr/author/lily25/
beste sportwetten app android
Also visit my blog post – pferderennen wetten erklärung
sportwetten seiten mit bonus freiwette ohne
einzahlung
eurovision buchmacher
My page – bet365 basketball Wetten
esports wettanbieter
my webpage: wettbüro quoten
sportwetten vorhersage app profi tipps