Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 814120 Details for
Bug 872821
sys-process/psinfo: it stuck on RISC-V ARCH
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
psinfo-0.12-int.patch
psinfo-0.12-int.patch (text/plain), 1.01 KB, created by
Yixun Lan
on 2022-09-25 12:17:22 UTC
(
hide
)
Description:
psinfo-0.12-int.patch
Filename:
MIME Type:
Creator:
Yixun Lan
Created:
2022-09-25 12:17:22 UTC
Size:
1.01 KB
patch
obsolete
>diff --git a/psinfo.c b/psinfo.c >index 90a6d8f..05acedf 100644 >--- a/psinfo.c >+++ b/psinfo.c >@@ -172,14 +172,15 @@ int parse_proc_wchan(FILE * f, struct process_info *p) > int parse_proc_arrayfile(char *name, char ***s) > { > FILE *f; >- int res = 1; >+ int ret, res = 1; > > if ((f = fopen(name, "r")) != NULL) { > char *buf; > int len = 0, bufsize = 1024, count = 0; > > buf = malloc(bufsize); >- while ((buf[len++] = fgetc(f)) != EOF) { >+ while ((ret = fgetc(f)) != EOF) { >+ buf[len++] = ret & 0xFF; > if (buf[len - 1] == 0) { > *s = realloc(*s, (count + 2) * sizeof(char *)); > (*s)[count] = malloc(len); >@@ -673,8 +674,7 @@ void print_help() > int main(int argc, char **argv) > { > struct process_info *p; >- int pid, output_general = 0, output_cpu = 0, output_io = 0, output_memory = 0, output_privilege = 0, output_signal = 0, result = 0; >- char c; >+ int c, pid, output_general = 0, output_cpu = 0, output_io = 0, output_memory = 0, output_privilege = 0, output_signal = 0, result = 0; > > opterr = 0; > if (argc <= 1) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 872821
: 814120