Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ASA
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ASE-2021
ASA
Commits
40b87926
Commit
40b87926
authored
4 years ago
by
Thierno souleymane Bah
Browse files
Options
Downloads
Patches
Plain Diff
feat(rmvol programm added, removing the last volume added)
parent
227f64c7
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
tpfs/Makefile
+2
-1
2 additions, 1 deletion
tpfs/Makefile
tpfs/rmvol.c
+47
-0
47 additions, 0 deletions
tpfs/rmvol.c
with
49 additions
and
1 deletion
tpfs/Makefile
+
2
−
1
View file @
40b87926
...
@@ -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
BINARIES
=
mkhd display_sector format_sector write_sector mkvol dvol
rmvol
all
:
$(BINARIES) $(OBJECTS)
all
:
$(BINARIES) $(OBJECTS)
...
@@ -33,6 +33,7 @@ format_sector: format_sector.o drive.o
...
@@ -33,6 +33,7 @@ format_sector: format_sector.o drive.o
write_sector
:
write_sector.o drive.o
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
###------------------------------
###------------------------------
### Misc.
### Misc.
...
...
This diff is collapsed.
Click to expand it.
tpfs/rmvol.c
0 → 100644
+
47
−
0
View file @
40b87926
#include
<stdio.h>
#include
<stdlib.h>
#include
"hardware.h"
#include
"vol.h"
void
display_vol
()
{
if
(
mbr
.
nb_vols
==
0
)
{
fprintf
(
stderr
,
"Vous ne disposez d'aucun volume
\n
"
);
return
;
}
mbr
.
nb_vols
--
;
}
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
);
load_mbr
();
display_vol
();
save_mbr
();
/* and exit! */
exit
(
EXIT_SUCCESS
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment