Changeset View
Changeset View
Standalone View
Standalone View
lib/libprocstat/libprocstat.c
Show First 20 Lines • Show All 616 Lines • ▼ Show 20 Lines | #endif | ||||
case DTYPE_PROCDESC: | case DTYPE_PROCDESC: | ||||
type = PS_FST_TYPE_PROCDESC; | type = PS_FST_TYPE_PROCDESC; | ||||
data = file.f_data; | data = file.f_data; | ||||
break; | break; | ||||
case DTYPE_DEV: | case DTYPE_DEV: | ||||
type = PS_FST_TYPE_DEV; | type = PS_FST_TYPE_DEV; | ||||
data = file.f_data; | data = file.f_data; | ||||
break; | break; | ||||
case DTYPE_EVENTFD: | |||||
type = PS_FST_TYPE_EVENTFD; | |||||
data = file.f_data; | |||||
break; | |||||
default: | default: | ||||
continue; | continue; | ||||
} | } | ||||
/* XXXRW: No capability rights support for kvm yet. */ | /* XXXRW: No capability rights support for kvm yet. */ | ||||
entry = filestat_new_entry(data, type, i, | entry = filestat_new_entry(data, type, i, | ||||
to_filestat_flags(file.f_flag), 0, 0, 0, NULL, NULL); | to_filestat_flags(file.f_flag), 0, 0, 0, NULL, NULL); | ||||
if (entry != NULL) | if (entry != NULL) | ||||
STAILQ_INSERT_TAIL(head, entry, next); | STAILQ_INSERT_TAIL(head, entry, next); | ||||
▲ Show 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | static struct { | ||||
{ KF_TYPE_MQUEUE, PS_FST_TYPE_MQUEUE }, | { KF_TYPE_MQUEUE, PS_FST_TYPE_MQUEUE }, | ||||
{ KF_TYPE_NONE, PS_FST_TYPE_NONE }, | { KF_TYPE_NONE, PS_FST_TYPE_NONE }, | ||||
{ KF_TYPE_PIPE, PS_FST_TYPE_PIPE }, | { KF_TYPE_PIPE, PS_FST_TYPE_PIPE }, | ||||
{ KF_TYPE_PTS, PS_FST_TYPE_PTS }, | { KF_TYPE_PTS, PS_FST_TYPE_PTS }, | ||||
{ KF_TYPE_SEM, PS_FST_TYPE_SEM }, | { KF_TYPE_SEM, PS_FST_TYPE_SEM }, | ||||
{ KF_TYPE_SHM, PS_FST_TYPE_SHM }, | { KF_TYPE_SHM, PS_FST_TYPE_SHM }, | ||||
{ KF_TYPE_SOCKET, PS_FST_TYPE_SOCKET }, | { KF_TYPE_SOCKET, PS_FST_TYPE_SOCKET }, | ||||
{ KF_TYPE_VNODE, PS_FST_TYPE_VNODE }, | { KF_TYPE_VNODE, PS_FST_TYPE_VNODE }, | ||||
{ KF_TYPE_EVENTFD, PS_FST_TYPE_EVENTFD }, | |||||
{ KF_TYPE_UNKNOWN, PS_FST_TYPE_UNKNOWN } | { KF_TYPE_UNKNOWN, PS_FST_TYPE_UNKNOWN } | ||||
}; | }; | ||||
#define NKFTYPES (sizeof(kftypes2fst) / sizeof(*kftypes2fst)) | #define NKFTYPES (sizeof(kftypes2fst) / sizeof(*kftypes2fst)) | ||||
unsigned int i; | unsigned int i; | ||||
for (i = 0; i < NKFTYPES; i++) | for (i = 0; i < NKFTYPES; i++) | ||||
if (kftypes2fst[i].kf_type == kftype) | if (kftypes2fst[i].kf_type == kftype) | ||||
break; | break; | ||||
▲ Show 20 Lines • Show All 1,916 Lines • Show Last 20 Lines |