chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] handle only block and class devices
[elogind.git]
/
udev_lib.h
diff --git
a/udev_lib.h
b/udev_lib.h
index 18ce25ccc791475a450888747171ebc22fe7065b..53ad92d505443b584567fbeca8118bdef9662c45 100644
(file)
--- a/
udev_lib.h
+++ b/
udev_lib.h
@@
-59,6
+59,12
@@
do { \
snprintf((to) + strlen(to), maxsize - strlen(to)-1, "%u", i); \
} while (0)
snprintf((to) + strlen(to), maxsize - strlen(to)-1, "%u", i); \
} while (0)
+#define strlongcat(to, i) \
+do { \
+ to[sizeof(to)-1] = '\0'; \
+ snprintf((to) + strlen(to), sizeof(to) - strlen(to)-1, "%li", i); \
+} while (0)
+
#define foreach_strpart(str, separator, pos, len) \
for(pos = str, len = 0; \
(pos) < ((str) + strlen(str)); \
#define foreach_strpart(str, separator, pos, len) \
for(pos = str, len = 0; \
(pos) < ((str) + strlen(str)); \