------------------------------------------------------------------------- Question: What permission mode should we give to a new file when it is imported? It appears that we are supposed to give permission to the owner of drwx when we import a file. Is this correct? Answer: Yes, that is correct. It corresponds to 983040 decimal or 0xf0000. OLD (INCORRECT): For FScopy, the permissions should be the same as for the minifile being copied. NEW (CORRECTED): For FScopy, the permissions should be the same as for an imported file, as described above. For FSrename, the permissions should stay the same. ------------------------------------------------------------- Question: When dealing with permissions, if the user is not the owner of the file, should we be treating user 0 (the root user) as being in the same group or just in the others (world)? Answer: Treat every user as being in a separate group. ------------------------------------------------------------- Question: We have 7 digits of available space in the owner number field in FSdir. When making sure the user number is valid, should we be checking against 4 digits or 7? Answer: Any non-negative integer is permitted. However, the output format only shows those up to 7 digits neatly. Beyond that the format is undefined. ------------------------------------------------------------- Question: In the permissions integer, there are are some unused bits. Can I use them for special features without creating a problem for later phases? Answer: Yes, you can define the remaining bits to have any purpose you want for your special features. Phase 3 does not add any meanings for these bits. ------------------------------------------------------------- Question: I notice that the errors list on your website doesn't match up with the output files. In particular, the log2-01.txt lists Error 22 as "Insufficient permission to perform operation on minifile", but the error messages .txt lists that as error 29, with 22 being the time travel error. Will one list or the other be updated prior to the marking of phase 2? Answer: You are correct; there was an inconsistency. The ErrorMessages.txt file posted on the website has been changed to renumber the old error message #29 as #22 and to renumber messages #22 to #28 as #23 to #29. In other words, the old #29 was inserted before the old #22. ------------------------------------------------------------- Question: Every time I call the FScreate function, it seems to overwrite the previous file system that I already stored in the binary file. I only want to update the binary file with some new information. As my program currently exists, if I use FScreate more than one time, the binary file only has the latest create file system stored in the file. Answer: I suspect that your file is not being opened for "input and output", which is also called "r+w" or "r+" mode. Here is some C++ code that opens a file called diskfile in binary mode for both input and output. DiskFile.open(diskfile, ios::binary | ios::in | ios::out); if (!DiskFile) { return CANNOT_FORMAT_DISK; } ------------------------------------------------------------- Question: Is 3840 the correct value to enter into the permission field for the passwords.dat file? Answer: No, 3840 was an error in the Phase 1 description. The correct value is 983040 (decimal), which corresponds to 0xf0000 (i.e., f0000 in hexadecimal). ------------------------------------------------------------------------- Question: I noticed that you have error messages in your renames, i.e., 40 0 FSrename Projectiles.iff 1 *ERROR 3: Invalid parameter I think a single number can be a file name. Under linux it is perfectly acceptable to have a file named "1". Answer: For SOS, a filename must begin with a letter. See the Phase 2 instructions for the "FSimport" command. ------------------------------------------------------------------------- Question: We can store permissions in an int using hexadecimal values, e.g., p = 0x800; but I don't know how to extract the data out of this. For instance, how do we check to see if there are any 0x8 or 0x20 values in it? Answer: The conditions if (p & 0x800 == 0x800) if (p & 0x20 == 0x20) if (p & 0x8 == 0x8) should be true if the specified bit is true -------------------------------------------------------------------------