Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_descrip.c
Show First 20 Lines • Show All 3,403 Lines • ▼ Show 20 Lines | xlate_fflags(int fflags) | ||||
kflags = 0; | kflags = 0; | ||||
for (i = 0; i < nitems(fflags_table); i++) | for (i = 0; i < nitems(fflags_table); i++) | ||||
if (fflags & fflags_table[i].fflag) | if (fflags & fflags_table[i].fflag) | ||||
kflags |= fflags_table[i].kf_fflag; | kflags |= fflags_table[i].kf_fflag; | ||||
return (kflags); | return (kflags); | ||||
} | } | ||||
/* Trim unused data from kf_path by truncating the structure size. */ | /* Trim unused data from kf_path by truncating the structure size. */ | ||||
static void | void | ||||
pack_kinfo(struct kinfo_file *kif) | pack_kinfo(struct kinfo_file *kif) | ||||
{ | { | ||||
kif->kf_structsize = offsetof(struct kinfo_file, kf_path) + | kif->kf_structsize = offsetof(struct kinfo_file, kf_path) + | ||||
strlen(kif->kf_path) + 1; | strlen(kif->kf_path) + 1; | ||||
kif->kf_structsize = roundup(kif->kf_structsize, sizeof(uint64_t)); | kif->kf_structsize = roundup(kif->kf_structsize, sizeof(uint64_t)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 813 Lines • Show Last 20 Lines |