projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perf kvm stat report: Unify the title bar output
[deliverable/linux.git]
/
tools
/
perf
/
perf.c
diff --git
a/tools/perf/perf.c
b/tools/perf/perf.c
index 2282d41879a2b2ef0c1927f91856c21948e68f30..452a8474d29d8cedbed3e47f46a4ebc728663907 100644
(file)
--- a/
tools/perf/perf.c
+++ b/
tools/perf/perf.c
@@
-313,6
+313,7
@@
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
int status;
struct stat st;
const char *prefix;
int status;
struct stat st;
const char *prefix;
+ char sbuf[STRERR_BUFSIZE];
prefix = NULL;
if (p->option & RUN_SETUP)
prefix = NULL;
if (p->option & RUN_SETUP)
@@
-343,7
+344,8
@@
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
status = 1;
/* Check for ENOSPC and EIO errors.. */
if (fflush(stdout)) {
status = 1;
/* Check for ENOSPC and EIO errors.. */
if (fflush(stdout)) {
- fprintf(stderr, "write failure on standard output: %s", strerror(errno));
+ fprintf(stderr, "write failure on standard output: %s",
+ strerror_r(errno, sbuf, sizeof(sbuf)));
goto out;
}
if (ferror(stdout)) {
goto out;
}
if (ferror(stdout)) {
@@
-351,7
+353,8
@@
static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
goto out;
}
if (fclose(stdout)) {
goto out;
}
if (fclose(stdout)) {
- fprintf(stderr, "close failed on standard output: %s", strerror(errno));
+ fprintf(stderr, "close failed on standard output: %s",
+ strerror_r(errno, sbuf, sizeof(sbuf)));
goto out;
}
status = 0;
goto out;
}
status = 0;
@@
-466,6
+469,7
@@
void pthread__unblock_sigwinch(void)
int main(int argc, const char **argv)
{
const char *cmd;
int main(int argc, const char **argv)
{
const char *cmd;
+ char sbuf[STRERR_BUFSIZE];
/* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
/* The page_size is placed in util object. */
page_size = sysconf(_SC_PAGE_SIZE);
@@
-561,7
+565,7
@@
int main(int argc, const char **argv)
}
fprintf(stderr, "Failed to run command '%s': %s\n",
}
fprintf(stderr, "Failed to run command '%s': %s\n",
- cmd, strerror
(errno
));
+ cmd, strerror
_r(errno, sbuf, sizeof(sbuf)
));
out:
return 1;
}
out:
return 1;
}
This page took
0.024448 seconds
and
5
git commands to generate.