Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 355021
b: refs/heads/master
c: 8467fdb
h: refs/heads/master
i:
  355019: 70bc4fe
v: v3
  • Loading branch information
Tomas Hozza authored and Greg Kroah-Hartman committed Jan 19, 2013
1 parent 0c6bdb4 commit 6e5c1b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: 0f3f2f86b22c41bb102a15ca4ca7f41c7414ab0d
refs/heads/master: 8467fdbb09ca0766b638171723624f3da8703055
8 changes: 4 additions & 4 deletions trunk/tools/hv/hv_kvp_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static void kvp_update_file(int pool)
*/
kvp_acquire_lock(pool);

filep = fopen(kvp_file_info[pool].fname, "w");
filep = fopen(kvp_file_info[pool].fname, "we");
if (!filep) {
kvp_release_lock(pool);
syslog(LOG_ERR, "Failed to open file, pool: %d", pool);
Expand Down Expand Up @@ -182,7 +182,7 @@ static void kvp_update_mem_state(int pool)

kvp_acquire_lock(pool);

filep = fopen(kvp_file_info[pool].fname, "r");
filep = fopen(kvp_file_info[pool].fname, "re");
if (!filep) {
kvp_release_lock(pool);
syslog(LOG_ERR, "Failed to open file, pool: %d", pool);
Expand Down Expand Up @@ -246,13 +246,13 @@ static int kvp_file_init(void)
records_read = 0;
num_blocks = 1;
sprintf(fname, "%s/.kvp_pool_%d", KVP_CONFIG_LOC, i);
fd = open(fname, O_RDWR | O_CREAT, 0644 /* rw-r--r-- */);
fd = open(fname, O_RDWR | O_CREAT | O_CLOEXEC, 0644 /* rw-r--r-- */);

if (fd == -1)
return 1;


filep = fopen(fname, "r");
filep = fopen(fname, "re");
if (!filep)
return 1;

Expand Down

0 comments on commit 6e5c1b8

Please sign in to comment.