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
- When printing the values of statbuf.st_size and
statbuf.st_mtime
you must cast these (to int or long) before printing.
- The show_info function should output only what is stated, and in
particular should not output any error message if it returns 0.
- The finction should only return 0 or 1.
- Output the file modification time twice in different formats.
Use the st_mtime field in each case.
- Do not use st_ctime in this function.
- Do not print the access time of the file or the current time.
- Do not call gettimeofday
- You should not use malloc in this function because:
- It is not necessary
- If you do, you must free any memory created before returning
- Do not convert anything to floating point for output.
- stat should only be called once.
- You should not have to open the file in this method.
If you open the file, you must also close it.
- Don't include line numbers in your source program.