Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103379208
D44160.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D44160.diff
View Options
diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c
--- a/usr.bin/kdump/kdump.c
+++ b/usr.bin/kdump/kdump.c
@@ -46,6 +46,7 @@
#include <sys/ktrace.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
+#include <sys/poll.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/sysent.h>
@@ -110,6 +111,7 @@
void ktrfault(struct ktr_fault *);
void ktrfaultend(struct ktr_faultend *);
void ktrkevent(struct kevent *);
+void ktrpollfd(struct pollfd *);
void ktrstructarray(struct ktr_struct_array *, size_t);
void ktrbitset(char *, struct bitset *, size_t);
void ktrsyscall_freebsd(struct ktr_syscall *ktr, register_t **resip,
@@ -2209,10 +2211,23 @@
printf(", data=%#jx, udata=%p }", (uintmax_t)kev->data, kev->udata);
}
+void
+ktrpollfd(struct pollfd *pfd)
+{
+
+ printf("{ fd=%d", pfd->fd);
+ printf(", events=");
+ print_mask_arg0(sysdecode_pollfd_events, pfd->events);
+ printf(", revents=");
+ print_mask_arg0(sysdecode_pollfd_events, pfd->revents);
+ printf("}");
+}
+
void
ktrstructarray(struct ktr_struct_array *ksa, size_t buflen)
{
struct kevent kev;
+ struct pollfd pfd;
char *name, *data;
size_t namelen, datalen;
int i;
@@ -2294,6 +2309,11 @@
kev.udata = (void *)(uintptr_t)kev32.udata;
ktrkevent(&kev);
#endif
+ } else if (strcmp(name, "pollfd") == 0) {
+ if (ksa->struct_size != sizeof(pfd))
+ goto bad_size;
+ memcpy(&pfd, data, sizeof(pfd));
+ ktrpollfd(&pfd);
} else {
printf("<unknown structure> }\n");
return;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 6:28 AM (15 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14836115
Default Alt Text
D44160.diff (1 KB)
Attached To
Mode
D44160: kdump: decode pollfd struct arrays coming from poll(2)
Attached
Detach File
Event Timeline
Log In to Comment