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

Avoid crashes on /proc/ish from CLI build #2386

Merged
merged 1 commit into from May 11, 2024

Conversation

cgull
Copy link
Contributor

@cgull cgull commented May 11, 2024

find /proc segfaults on CLI iSH.

The CLI iSH does not implement some callouts that iSH's procfs provides for the GUI, and the procfs does not check that these callouts actually exist. This fixes that.

Copy link
Member

@tbodt tbodt left a comment

Choose a reason for hiding this comment

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

Looks mostly good, other than indentation. Thanks!

fs/proc/ish.c Outdated
@@ -55,6 +55,10 @@ static int proc_ish_show_colors(struct proc_entry *UNUSED(entry), struct proc_da
}

static int proc_ish_show_documents(struct proc_entry *UNUSED(entry), struct proc_data *buf) {
if (get_documents_directory == NULL) {
proc_printf(buf, "\n");
return 0;
Copy link
Member

Choose a reason for hiding this comment

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

Please fix indentation (is this perhaps using tabs instead of spaces or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, tabs. You may see these in C code occasionally. :)

You might want to add some style guidance to the docs, or enforce with clang-format, if it's important to you.

Also fixed in #2387

Copy link
Member

Choose a reason for hiding this comment

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

The problem with it is that github renders tabs as four spaces, while your editor probably used eight... thus are the hazards of mixing indentation types.

@tbodt tbodt merged commit 3eb6c25 into ish-app:master May 11, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants