diff options
author | David Howells <dhowells@redhat.com> | 2010-02-22 15:39:39 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2010-02-22 16:01:39 +0000 |
commit | 9be94079efbccd689ae346184c9600cd6fb4aa9e (patch) | |
tree | 26f2c111ae71e04412b0ae9d18960ba707d1c4fd /keyctl.c | |
parent | 5291796474869579f151f7821410e3ef96d1fa7e (diff) | |
download | keyutils-9be94079efbccd689ae346184c9600cd6fb4aa9e.tar.gz |
keyutils historical version 0.3v0.3
- Must invoke initialisation from perror() override in libkeyutils
- Minor UI changes
- Bump version to permit building in main repositories.
- Don't attempt to define the error codes in the header file.
- Pass the release ID through to the makefile to affect the shared library name.
- Build in the perror() override to get the key error strings displayed.
- Need a defattr directive after each files directive.
Diffstat (limited to 'keyctl.c')
-rw-r--r-- | keyctl.c | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -654,11 +654,16 @@ static int act_keyctl_rlist(int argc, char *argv[]) count /= sizeof(key_serial_t); /* list the keys in the keyring */ - pk = keylist; - do { - key = *pk++; - printf("%d%c", key, count == 1 ? '\n' : ' '); - } while (--count); + if (count <= 0) { + printf("\n"); + } + else { + pk = keylist; + for (; count > 0; count--) { + key = *pk++; + printf("%d%c", key, count == 1 ? '\n' : ' '); + } + } return 0; |