diff options
author | Karel Zak | 2018-09-14 16:26:38 +0200 |
---|---|---|
committer | Karel Zak | 2018-09-14 16:26:38 +0200 |
commit | 5b82289b6071acfdccb1aff7beb9e63d950aac55 (patch) | |
tree | 22d216560f15daa60893930e6236993e0e161577 /lib | |
parent | lsblk: differentiate between swap and mount (diff) | |
download | kernel-qcow2-util-linux-5b82289b6071acfdccb1aff7beb9e63d950aac55.tar.gz kernel-qcow2-util-linux-5b82289b6071acfdccb1aff7beb9e63d950aac55.tar.xz kernel-qcow2-util-linux-5b82289b6071acfdccb1aff7beb9e63d950aac55.zip |
lib/strutils: return from xstrmode()
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/strutils.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/strutils.c b/lib/strutils.c index 88ea6f277..b71dde596 100644 --- a/lib/strutils.c +++ b/lib/strutils.c @@ -486,7 +486,7 @@ void strtotimeval_or_err(const char *str, struct timeval *tv, const char *errmes * Converts stat->st_mode to ls(1)-like mode string. The size of "str" must * be 11 bytes. */ -void xstrmode(mode_t mode, char *str) +char *xstrmode(mode_t mode, char *str) { unsigned short i = 0; @@ -521,6 +521,8 @@ void xstrmode(mode_t mode, char *str) ? (mode & S_IXOTH ? 't' : 'T') : (mode & S_IXOTH ? 'x' : '-')); str[i] = '\0'; + + return str; } /* |