Code comments

This commit is contained in:
Sankar சங்கர் 2013-04-23 14:42:36 +05:30
parent 3ad58de506
commit a96e3142dd

View File

@ -37,6 +37,7 @@ int main(int argc, char *argv[])
return -1;
}
/* Begin writing of Block 0 - Super Block */
sb.version = 1;
sb.magic = SIMPLEFS_MAGIC;
sb.block_size = SIMPLEFS_DEFAULT_BLOCK_SIZE;
@ -58,6 +59,9 @@ int main(int argc, char *argv[])
}
printf("Super block written succesfully\n");
/* End of writing of Block 0 - Super block */
/* Begin writing of Block 1 - Inode Store */
root_inode.mode = S_IFDIR;
root_inode.inode_no = SIMPLEFS_ROOTDIR_INODE_NUMBER;
@ -104,6 +108,9 @@ int main(int argc, char *argv[])
printf
("inode store padding bytes (after the two inodes) written sucessfully\n");
/* End of writing of Block 1 - inode Store */
/* Begin writing of Block 2 - Root Directory datablocks */
strcpy(record.filename, welcomefile_name);
record.inode_no = WELCOMEFILE_INODE_NUMBER;
nbytes = sizeof(record);
@ -130,7 +137,9 @@ int main(int argc, char *argv[])
}
printf
("padding after the rootdirectory children written succesfully\n");
/* End of writing of Block 2 - Root directory contents */
/* Begin writing of Block 3 - Welcome file contents */
nbytes = sizeof(welcomefile_body);
ret = write(fd, welcomefile_body, nbytes);
if (ret != nbytes) {
@ -139,6 +148,7 @@ int main(int argc, char *argv[])
goto exit;
}
printf("welcomefilebody has been written succesfully\n");
/* End of writing of Block 3 - Welcome file contents */
ret = 0;