FreeBSD Bugzilla – Attachment 16112 Details for
Bug 29682
/proc/pid/status broken for irqN processes.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.12 KB, created by
Josef Karthauser
on 2001-08-13 22:00:05 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Josef Karthauser
Created:
2001-08-13 22:00:05 UTC
Size:
1.12 KB
patch
obsolete
>Index: procfs_status.c >=================================================================== >RCS file: /home/ncvs/src/sys/fs/procfs/procfs_status.c,v >retrieving revision 1.32 >diff -u -r1.32 procfs_status.c >--- procfs_status.c 2001/07/05 17:10:43 1.32 >+++ procfs_status.c 2001/08/12 15:03:10 >@@ -58,6 +58,8 @@ > > #include <fs/procfs/procfs.h> > >+void jbcopy(const char *src0, char *dst0, register size_t length); >+ > #define DOCHECK() do { if (ps >= psbuf+sizeof(psbuf)) goto bailout; } while (0) > int > procfs_dostatus(curp, p, pfs, uio) >@@ -95,7 +97,7 @@ > ("Too short buffer for new MAXCOMLEN")); > > ps = psbuf; >- bcopy(p->p_comm, ps, MAXCOMLEN); >+ jbcopy(p->p_comm, ps, MAXCOMLEN); > ps[MAXCOMLEN] = '\0'; > ps += strlen(ps); > DOCHECK(); >@@ -188,6 +190,34 @@ > > bailout: > return (ENOMEM); >+} >+ >+ >+ >+void >+jbcopy(src0, dst0, length) >+ const char *src0; >+ char *dst0; >+ register size_t length; >+{ >+ int i; >+ >+ for (i = 0 ; i < length ; ++i) { >+ *dst0 = *src0; >+ if (*dst0 == ' ') { >+ *dst0 = '_'; >+ } >+ if (!*src0) { >+ break; >+ } >+ >+ ++dst0; >+ ++src0; >+ } >+ >+ if (i == length) { >+ *dst0 = '\0'; >+ } > } > > int
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 29682
: 16112