Fix04: Lab4 Errata

Below is a list of incorrect/inaccurate hints and their corrections. This page will be kept updated.

  1. [update 11/28] Exercise 1: an incorrect comment in fs5600.h
    fs5600.h has
    uint32_t ctime; // creation time
    The comment is wrong: "ctime" means "change time", meaning: (see also "man 2 stat").
    struct timespec st_ctim; /* Time of last status change */

  2. [update 11/28] Exercise 2: converting "uint32_t" to "struct timespec"
    The hint of treating "struct timespec" as "uint32_t" is a wrong hint (might work on some of machines but not on others). Instead, your code should read the time-related attributes from fs5600 inode and write them to the "struct timespec" attributes of the "struct stat".
  3. [update 11/29] Exercise 3: a confusing rename unit test
    test1.c has the following test cases:
    struct rename_case err1[] = {
    ...
    {"/dir2/file.4k", "/dir3/somefile", EINVAL},
    ...
    };

    You should update "/dir2/file.4k" (a non-existing file) to be "/dir2/file.4k+" (an existing file). This is a typo.
    For the original typoed test case, returning either "EINVAL" or "ENOENT" is fine since the file "/dir2/file.4k" doesn't exist and it violates an fs5600 assumption (rename happens in the same directory).