chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mounts: make /cgroup a tmpfs file system
[elogind.git]
/
src
/
util.h
diff --git
a/src/util.h
b/src/util.h
index ccb976925638bae4a0a6529eb567144b0b43dd23..efc993c370488a6bfea6dda302ad0b7f3949495f 100644
(file)
--- a/
src/util.h
+++ b/
src/util.h
@@
-32,6
+32,11
@@
typedef uint64_t usec_t;
typedef uint64_t usec_t;
+typedef struct timestamp {
+ usec_t realtime;
+ usec_t monotonic;
+} timestamp;
+
#define MSEC_PER_SEC 1000ULL
#define USEC_PER_SEC 1000000ULL
#define USEC_PER_MSEC 1000ULL
#define MSEC_PER_SEC 1000ULL
#define USEC_PER_SEC 1000000ULL
#define USEC_PER_MSEC 1000ULL
@@
-49,9
+54,12
@@
typedef uint64_t usec_t;
#define NEWLINE "\n\r"
#define FORMAT_TIMESTAMP_MAX 64
#define NEWLINE "\n\r"
#define FORMAT_TIMESTAMP_MAX 64
+#define FORMAT_TIMESPAN_MAX 64
usec_t now(clockid_t clock);
usec_t now(clockid_t clock);
+timestamp* timestamp_get(timestamp *ts);
+
usec_t timespec_load(const struct timespec *ts);
struct timespec *timespec_store(struct timespec *ts, usec_t u);
usec_t timespec_load(const struct timespec *ts);
struct timespec *timespec_store(struct timespec *ts, usec_t u);
@@
-181,6
+189,7
@@
bool ignore_file(const char *filename);
bool chars_intersect(const char *a, const char *b);
char *format_timestamp(char *buf, size_t l, usec_t t);
bool chars_intersect(const char *a, const char *b);
char *format_timestamp(char *buf, size_t l, usec_t t);
+char *format_timespan(char *buf, size_t l, usec_t t);
int make_stdio(int fd);
int make_stdio(int fd);
@@
-238,6
+247,8
@@
int path_is_mount_point(const char *path);
bool is_device_path(const char *path);
bool is_device_path(const char *path);
+int dir_is_empty(const char *path);
+
extern char * __progname;
const char *ioprio_class_to_string(int i);
extern char * __progname;
const char *ioprio_class_to_string(int i);