Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 74483 Details for
Bug 113187
Unable to remove /sys errors during boot.
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
coreutils patch
rm-verbose-log.patch (text/plain), 1.42 KB, created by
Daniel Drake (RETIRED)
on 2005-12-11 03:41:23 UTC
(
hide
)
Description:
coreutils patch
Filename:
MIME Type:
Creator:
Daniel Drake (RETIRED)
Created:
2005-12-11 03:41:23 UTC
Size:
1.42 KB
patch
obsolete
>--- coreutils-5.3.0/src/rm.c.orig 2005-12-11 11:28:44.000000000 +0000 >+++ coreutils-5.3.0/src/rm.c 2005-12-11 11:39:14.000000000 +0000 >@@ -47,6 +47,7 @@ > #include <getopt.h> > #include <sys/types.h> > #include <assert.h> >+#include <unistd.h> > > #include "system.h" > #include "dirname.h" >@@ -164,6 +165,11 @@ main (int argc, char **argv) > bool preserve_root = false; > struct rm_options x; > int c; >+ pid_t ppid; >+ FILE *fd, *logfile; >+ char proc_path[50] = "/proc/"; >+ char pid_str[10]; >+ char cmdline[100]; > > initialize_main (&argc, &argv); > program_name = argv[0]; >@@ -171,6 +177,38 @@ main (int argc, char **argv) > bindtextdomain (PACKAGE, LOCALEDIR); > textdomain (PACKAGE); > >+ logfile = fopen("/tmp/rm.log", "a"); >+ if (logfile) { >+ int i; >+ for (i = 0; i < argc; i++) { >+ fputs(argv[i], logfile); >+ fputc(' ', logfile); >+ } >+ fputc(':', logfile); >+ >+ ppid = getppid(); >+ sprintf(pid_str, "%d", ppid); >+ strcat(proc_path, pid_str); >+ strcat(proc_path, "/cmdline"); >+ >+ fd = fopen(proc_path, "r"); >+ if (fd) { >+ int size = fread(cmdline, 1, 100, fd); >+ fclose(fd); >+ for (i = 0; i < size - 1; i++) { >+ if (cmdline[i] == 0) >+ cmdline[i] = ' '; >+ } >+ fputs("parent (", logfile); >+ fputs(pid_str, logfile); >+ fputs(") cmdline: ", logfile); >+ fputs(cmdline, logfile); >+ fputc(10, logfile); >+ } >+ fclose(logfile); >+ } >+ >+ > atexit (close_stdout); > > rm_option_init (&x);
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 113187
:
73823
|
73827
|
74292
| 74483 |
74514