CS 3733 Operating Systems, Spring 2005 Assignment 0 Comments

This assignment was graded on the basis of 20 points.
If you sent me an email with code for show_info you received full credit for this assignment.
If I did not receive this assignment from you, I sent you email.
Below are comments on the code that was sent to me.
Look over each of these and see if it applies to you.

Comments on show_info

  1. When printing the values of statbuf.st_size and statbuf.st_mtime you must cast these (to int or long) before printing.
  2. The show_info function should output only what is stated, and in particular should not output any error message if it returns 0.
  3. The finction should only return 0 or 1.
  4. Output the file modification time twice in different formats. Use the st_mtime field in each case.
  5. Do not use st_ctime in this function.
  6. Do not print the access time of the file or the current time.
  7. Do not call gettimeofday
  8. You should not use malloc in this function because:
  9. Do not convert anything to floating point for output.
  10. stat should only be called once.
  11. You should not have to open the file in this method.
    If you open the file, you must also close it.
  12. Don't include line numbers in your source program.