From a96e3142dd22514eee40231b16714ce5aec87dbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sankar=20=E0=AE=9A=E0=AE=99=E0=AF=8D=E0=AE=95=E0=AE=B0?= =?UTF-8?q?=E0=AF=8D?= Date: Tue, 23 Apr 2013 14:42:36 +0530 Subject: [PATCH] Code comments --- mkfs-simplefs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/mkfs-simplefs.c b/mkfs-simplefs.c index a79e5c9..1c68491 100644 --- a/mkfs-simplefs.c +++ b/mkfs-simplefs.c @@ -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;