repo.or.cz
/
fsck.sofs09.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Modular file structure.
[fsck.sofs09.git]
/
test_sbmagic.c
blob
36fdc196387848925776363f3904ef468e2deabc
1
#include <stdio.h>
2
3
#include
"fsck.h"
4
#include
"fsck_helper.h"
5
#include
"sofs09.h"
6
7
testresult_t
test_sbmagic
(
void
)
8
{
9
testresult_t ret
;
10
SOSuperBlock
*
sb
;
11
12
fetch_superblock
(&
sb
);
13
14
if
(
sb
->
magic
==
MAGIC_NUMBER
) {
15
ret
=
nice
;
16
}
else
{
17
ret
=
corrupt
;
18
printf
(
"This is not a valid SOFS09 filesystem.
\n
"
);
19
}
20
21
return
ret
;
22
}