Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157344
b: refs/heads/master
c: 7b1b916
h: refs/heads/master
v: v3
  • Loading branch information
David Howells authored and James Morris committed Sep 2, 2009
1 parent 39d973e commit 7119626
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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: ad73a717e0fc6949c44e587ca5d63c273a30e6f5
refs/heads/master: 7b1b9164598286fe93927ff41eed2a2609fd9056
12 changes: 3 additions & 9 deletions trunk/security/keys/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,9 @@ static int proc_keys_show(struct seq_file *m, void *v)
/* come up with a suitable timeout value */
if (key->expiry == 0) {
memcpy(xbuf, "perm", 5);
}
else if (now.tv_sec >= key->expiry) {
} else if (now.tv_sec >= key->expiry) {
memcpy(xbuf, "expd", 5);
}
else {
} else {
timo = key->expiry - now.tv_sec;

if (timo < 60)
Expand Down Expand Up @@ -253,9 +251,7 @@ static int proc_keys_show(struct seq_file *m, void *v)
seq_putc(m, '\n');

rcu_read_unlock();

return 0;

}

#endif /* CONFIG_KEYS_DEBUG_PROC_KEYS */
Expand All @@ -281,14 +277,14 @@ static struct rb_node *key_user_first(struct rb_root *r)
struct rb_node *n = rb_first(r);
return __key_user_next(n);
}

/*****************************************************************************/
/*
* implement "/proc/key-users" to provides a list of the key users
*/
static int proc_key_users_open(struct inode *inode, struct file *file)
{
return seq_open(file, &proc_key_users_ops);

}

static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
Expand All @@ -306,14 +302,12 @@ static void *proc_key_users_start(struct seq_file *p, loff_t *_pos)
}

return _p;

}

static void *proc_key_users_next(struct seq_file *p, void *v, loff_t *_pos)
{
(*_pos)++;
return key_user_next((struct rb_node *) v);

}

static void proc_key_users_stop(struct seq_file *p, void *v)
Expand Down

0 comments on commit 7119626

Please sign in to comment.