chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
systemctl: ellipsize job list only when necessary, highlight running
[elogind.git]
/
src
/
shared
/
util.h
diff --git
a/src/shared/util.h
b/src/shared/util.h
index
3885123
..
a8e962e
100644
(file)
--- a/
src/shared/util.h
+++ b/
src/shared/util.h
@@
-647,4
+647,11
@@
static inline bool logind_running(void) {
return access("/run/systemd/seats/", F_OK) >= 0;
}
+static inline unsigned decimal_str_max(unsigned x) {
+ unsigned ans = 1;
+ while (x /= 10)
+ ans ++;
+ return ans;
+}
+
int unlink_noerrno(const char *path);