Skip to content
Snippets Groups Projects
Commit aa5b2f58 authored by Thierno souleymane Bah's avatar Thierno souleymane Bah
Browse files

feat(mknfs programm in progress)

parent f0b9e0cb
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ LIBS = -L$(LIBDIR) -lhardware ...@@ -13,7 +13,7 @@ LIBS = -L$(LIBDIR) -lhardware
###------------------------------ ###------------------------------
### Main targets ### Main targets
###------------------------------------------------------------ ###------------------------------------------------------------
BINARIES= mkhd display_sector format_sector write_sector mkvol dvol rmvol BINARIES= mkhd display_sector format_sector write_sector mkvol dvol rmvol mknfs
all: $(BINARIES) $(OBJECTS) all: $(BINARIES) $(OBJECTS)
...@@ -34,6 +34,7 @@ write_sector: write_sector.o drive.o ...@@ -34,6 +34,7 @@ write_sector: write_sector.o drive.o
mkvol: mkvol.o vol.o drive.o mkvol: mkvol.o vol.o drive.o
dvol: dvol.o vol.o drive.o dvol: dvol.o vol.o drive.o
rmvol: rmvol.o vol.o drive.o rmvol: rmvol.o vol.o drive.o
mknfs: mknfs.o vol.o drive.o
###------------------------------ ###------------------------------
### Misc. ### Misc.
......
#include <stdio.h>
#include <stdlib.h>
#include "hardware.h"
#include "vol.h"
static void
empty_it()
{
return;
}
int main(int argc, char const *argv[])
{
unsigned int i;
/* init hardware */
if (init_hardware("hwconfig.ini") == 0)
{
fprintf(stderr, "Error in hardware initialization\n");
exit(EXIT_FAILURE);
}
/* Interreupt handlers */
for (i = 0; i < 16; i++)
IRQVECTOR[i] = empty_it;
/* Allows all IT */
_mask(1);
if (argc != 3)
{
fprintf(stderr, "Usage: %s <volume> <volume name>\n", argv[0]);
exit(EXIT_FAILURE);
}
load_mbr();
init_volume(atoi(argv[1]), (char *)argv[2]);
save_super();
load_super(atoi(argv[1]));
printf("cool\n");
/* and exit! */
exit(EXIT_SUCCESS);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment