Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/ramfs: Implement new file timestamps #995

Closed
wants to merge 1 commit into from

Conversation

andreittr
Copy link
Contributor

Description of changes

This change implements setting the file times of newly created files to the current time, filling in a placeholder that previously would set the times to the epoch (i.e., 1970-01-01 00:00 UTC).

Prerequisite checklist

  • Read the contribution guidelines regarding submitting new changes to the project;
  • Tested your changes against relevant architectures and platforms;
  • Ran the checkpatch.uk on your commit series before opening this PR;
  • Updated relevant documentation.

Base target

  • Architecture(s): N/A
  • Platform(s): N/A
  • Application(s): N/A

Additional configuration

Test with:

int f = open("file", O_WRONLY|O_CREAT, 0777);
fstat(f, &st);
printf("%ld %ld\n", st.st_atime, st.st_mtime);

This change implements setting the file times of newly created files to
the current time, filling in a placeholder that previously would set the
times to the epoch (i.e., 1970-01-01 00:00 UTC).

Signed-off-by: Andrei Tatar <andrei@unikraft.io>
@andreittr andreittr requested a review from a team as a code owner July 24, 2023 21:18
@razvand razvand self-assigned this Jul 24, 2023
@razvand razvand removed the request for review from a team July 24, 2023 21:53
@razvand razvand added kind/enhancement New feature or request area/lib Internal Unikraft Microlibrary lib/ramfs lang/c Issues or PRs to do with C/C++ priority/medium labels Jul 24, 2023
@razvand razvand added this to the v0.14.0 (Prometheus) milestone Jul 24, 2023
Copy link
Contributor

@DeliaPavel DeliaPavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Reviewed-by: Delia Pavel delia_maria.pavel@stud.acs.upb.ro

Copy link

@adinamariav adinamariav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.
Reviewed-by: Adina-Maria Vaman adinamariav22@gmail.com

Copy link
Contributor

@razvand razvand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved-by: Razvan Deaconescu razvand@unikraft.io

@unikraft-bot unikraft-bot added the ci/merged Merged by CI label Aug 7, 2023
@andreittr andreittr deleted the ttr/ramfs-nowtime branch August 7, 2023 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/lib Internal Unikraft Microlibrary ci/merged Merged by CI kind/enhancement New feature or request lang/c Issues or PRs to do with C/C++ lib/ramfs priority/medium
Projects
Status: Done!
Development

Successfully merging this pull request may close these issues.

None yet

5 participants