infree simplified, irtable_get corrected and sbname added.
[fsck.sofs09.git] / test_sbname.c
blob10ee76d3ac8357e840952a976c7119264676141e
1 #include <stdio.h>
3 #include "fsck.h"
4 #include "fsck_helper.h"
5 #include "sofs09.h"
7 testresult_t test_sbname (void)
9 testresult_t ret;
10 SOSuperBlock *sb;
11 int r;
13 fetch_superblock(&sb);
15 ret = corrupt;
16 for (r = 0; (r < PARTITION_NAME_SIZE) && (ret == corrupt); ++r) {
17 if ((sb->name)[r] == '\0') {
18 ret = nice;
22 if (ret == corrupt) {
23 printf("Partition name is not correctly terminated.\n");
24 } else {
25 printf("Partition name: %s.\n", sb->name);
28 return ret;