/* we consider udev running when /dev is on devtmpfs */
static bool udev_has_devtmpfs(struct udev *udev) {
- union file_handle_union h = {
- .handle.handle_bytes = MAX_HANDLE_SZ
- };
-
+ union file_handle_union h = FILE_HANDLE_INIT;
_cleanup_fclose_ FILE *f = NULL;
char line[LINE_MAX], *e;
int mount_id;
return NULL;
}
- if (buflen < 32 || (size_t)buflen >= sizeof(buf)) {
+ if (buflen < 32 || (smsg.msg_flags & MSG_TRUNC)) {
log_debug("invalid message length");
return NULL;
}