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

Add sample chmod program #84

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

John-Ted
Copy link

@John-Ted John-Ted commented Mar 25, 2023

Add a chmod example and the corresponding rootfs directory.

Signed-off-by: Ioan-Teodor Teugea <teodor.teugea@gmail.com>
int main() {
int rc = chmod("chmod_test_dir", 0700);
if (rc < 0)
printf("chmod failed errno=%d\n", errno);

Choose a reason for hiding this comment

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

Should return early / exit the program with failure e.g. exit(EXIT_FAILURE).

Thank you.

@andraprs andraprs removed their assignment Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

2 participants