Boa Noite,
Primeiramente, o que é VFS? VFS é Virtual File System. É uma camada que existe em muitos sistemas operacionais e também no Minix, que cuida da parte comunicação com o File System. O mesmo foi desenvolvido pelo Balázs Gerófi como tese de Mestrado na universidade de Amsterdam com nome de “Design and implementation of the MINIX Virtual File system“.
Mas por que se comunicar com o servidor VFS? Por que adicionar algo nele? Bom, se você está trabalhando em baixo nível e quer por exemplo acessar diretamente os INODES por algum motivo, você deve inicialmente se comunicar com o servidor VFS. Para realizar a comunicação é simples, mas vamos supor que você queira um método especifico que o mesmo não possue, então você deve cria-lo.
Como fazer isso?
Inicialmente você deve editar o “/usr/src/include/minix/callnr.h”. Adicione logo abaixo a linha “#define GETPGRP 63″ o seguinte:
[code lang=”c”]
#define TESTCALL 64
[/code]
Em seguida você deve modificar o servidor VFS e adicionar o que você quer que faça quando a mesma for chamada. Edite inicialmente o “/usr/src/servers/vfs/table.c”. Você deve pegar a linha que possui no_sys, /* 64 = unused */
E alterar para:
[code lang=”c”]
do_TESTCALL, /* 64 = unused */
[/code]
Este será o método chamado quando a syscall de número 64 for executada.
Após isso você deve alterar o “/usr/src/servers/vfs/proto.h” que é onde estão definidos os métodos. Adicione o seguinte:
[code lang=”c”]
/* do_TESTCALL EXAMPLE */
_PROTOTYPE( int do_TESTCALL, (void) );
[/code]
Então você deve criar o método propriamente dito dentro do “/usr/src/servers/vfs/read.c” (ao menos eu fiz nesse arquivo). Adicione o seguinte código:
[code lang=”c”]
/*===========================================================================*
*Trabalho: do_ver_contig *
*===========================================================================*/
PUBLIC int do_TESTCALL() {
message m;
printf(“Número recebido %d”, m_in.fd);
}
[/code]
Mas como executar? E ver isso tudo funcionando? Como compilar?
Inicialmente acesse “/usr/src/tools/” e execute:
$ make libraries
(Este pode ser um processo demorado)
Continue em “/usr/src/tools” e execute:
$ make hdboot
Reinicie.
Como testar e ver se está funcionando? Crie um arquivo no seu “/root” com o seguinte conteúdo:
[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]
O que isso é pra fazer? Fazer uma syscall no método 64, passar por mensagem o número 2, então o do_TESTCALL recebe o parametro e imprime o mesmo. Bem inutil, mas isto é pra demonstrar como criar métodos dentro do servidor VFS.
Exemplo dos códigos adicionados no servidor VFS
Criando uma biblioteca do sistema no Minix.
Atenciosamente,
Matheus
PS: É um exemplo bobo, mas é para demonstrar como adicionar métodos ao servidor VFS. Provavelmente nos próximos dias publicarei um exemplo, mais real.
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