Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336753
b: refs/heads/master
c: fb8eaeb
h: refs/heads/master
i:
  336751: b6d00b6
v: v3
  • Loading branch information
Palmer Cox authored and Rafael J. Wysocki committed Nov 27, 2012
1 parent e8ae5f4 commit cb7412c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 22 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 275a4dc441437d0074457591b46a45d7e45a817d
refs/heads/master: fb8eaeb7ab96b09c910e36abf7df7f9ecbb0fb60
19 changes: 0 additions & 19 deletions trunk/tools/power/cpupower/utils/helpers/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,6 @@ unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen)
return (unsigned int) numread;
}

static unsigned int sysfs_write_file(const char *path,
const char *value, size_t len)
{
int fd;
ssize_t numwrite;

fd = open(path, O_WRONLY);
if (fd == -1)
return 0;

numwrite = write(fd, value, len);
if (numwrite < 1) {
close(fd);
return 0;
}
close(fd);
return (unsigned int) numwrite;
}

/*
* Detect whether a CPU is online
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ int fill_string_with_spaces(char *s, int n)
void print_header(int topology_depth)
{
int unsigned mon;
int state, need_len, pr_mon_len;
int state, need_len;
cstate_t s;
char buf[128] = "";
int percent_width = 4;
Expand All @@ -93,7 +93,6 @@ void print_header(int topology_depth)
printf("%s|", buf);

for (mon = 0; mon < avail_monitors; mon++) {
pr_mon_len = 0;
need_len = monitors[mon]->hw_states_num * (percent_width + 3)
- 1;
if (mon != 0) {
Expand Down

0 comments on commit cb7412c

Please sign in to comment.