mirror of
https://github.com/AuxXxilium/eudev.git
synced 2024-12-15 19:16:08 +07:00
journal: when sending journal data via file, place it in /dev/shm, to allow early boot operation, even if it sucks
This commit is contained in:
parent
8d53b4534a
commit
9058851be7
@ -140,13 +140,16 @@ _public_ int sd_journal_sendv(const struct iovec *iov, int n) {
|
||||
int i, j = 0;
|
||||
struct msghdr mh;
|
||||
struct sockaddr_un sa;
|
||||
char path[] = "/tmp/journal.XXXXXX";
|
||||
ssize_t k;
|
||||
union {
|
||||
struct cmsghdr cmsghdr;
|
||||
uint8_t buf[CMSG_SPACE(sizeof(int))];
|
||||
} control;
|
||||
struct cmsghdr *cmsg;
|
||||
/* We use /dev/shm instead of /tmp here, since we want this to
|
||||
* be a tmpfs, and one that is available from early boot on
|
||||
* and where unprivileged users can create files. */
|
||||
char path[] = "/dev/shm/journal.XXXXXX";
|
||||
|
||||
if (!iov || n <= 0)
|
||||
return -EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user