chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
log: make internal log api log directly to the journal
[elogind.git]
/
src
/
journal
/
journal-send.c
diff --git
a/src/journal/journal-send.c
b/src/journal/journal-send.c
index c382264682efd785e52c8e77596f81c8c24819fe..d51aec9690bf48e22988efeceb4bcba8022140bb 100644
(file)
--- a/
src/journal/journal-send.c
+++ b/
src/journal/journal-send.c
@@
-195,7
+195,7
@@
_public_ int sd_journal_sendv(const struct iovec *iov, int n) {
zero(sa);
sa.sun_family = AF_UNIX;
zero(sa);
sa.sun_family = AF_UNIX;
- strncpy(sa.sun_path,"/run/systemd/journal/socket", sizeof(sa.sun_path));
+ strncpy(sa.sun_path,
"/run/systemd/journal/socket", sizeof(sa.sun_path));
zero(mh);
mh.msg_name = &sa;
zero(mh);
mh.msg_name = &sa;
@@
-209,7
+209,7
@@
_public_ int sd_journal_sendv(const struct iovec *iov, int n) {
return 0;
}
return 0;
}
-_public_ int sd_journal_stream_fd(const char *
tag, int priority, int priority
_prefix) {
+_public_ int sd_journal_stream_fd(const char *
identifier, int priority, int level
_prefix) {
union sockaddr_union sa;
int fd;
char *header;
union sockaddr_union sa;
int fd;
char *header;
@@
-238,17
+238,17
@@
_public_ int sd_journal_stream_fd(const char *tag, int priority, int priority_pr
return -errno;
}
return -errno;
}
- if (!
tag
)
-
tag
= "";
+ if (!
identifier
)
+
identifier
= "";
- l = strlen(
tag
);
+ l = strlen(
identifier
);
header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
header = alloca(l + 1 + 2 + 2 + 2 + 2 + 2);
- memcpy(header,
tag
, l);
+ memcpy(header,
identifier
, l);
header[l++] = '\n';
header[l++] = '0' + priority;
header[l++] = '\n';
header[l++] = '\n';
header[l++] = '0' + priority;
header[l++] = '\n';
- header[l++] = '0' + !!
priority
_prefix;
+ header[l++] = '0' + !!
level
_prefix;
header[l++] = '\n';
header[l++] = '0';
header[l++] = '\n';
header[l++] = '\n';
header[l++] = '0';
header[l++] = '\n';