Skip to content

Commit

Permalink
fixup! For demo purposes, procstat support for c18n. Not yet a merge …
Browse files Browse the repository at this point in the history
…candidate.
  • Loading branch information
dpgao committed Apr 22, 2024
1 parent c73231e commit 363e20e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/libprocstat/libprocstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@
#include <sys/mount.h>
#include <sys/filedesc.h>
#include <sys/pipe.h>
#if __has_feature(capabilities)
#include <cheri/cheri.h>
#endif
#include <fs/devfs/devfs.h>
#include <fs/devfs/devfs_int.h>
#include <nfs/nfsproto.h>
Expand Down Expand Up @@ -356,13 +358,14 @@ procstat_freeprocs(struct procstat *procstat __unused, struct kinfo_proc *p)
p = NULL;
}

#if __has_feature(capabilities)
int
procstat_getc18n(struct procstat *procstat, struct kinfo_proc *kp, void **pp,
size_t *lenp)
{
int error, name[4];

*lenp = C18N_STATS_MAX_LEN; /* Sensible maximim. Unsensible constant. */
*lenp = C18N_STATS_MAX_LEN;
*pp = malloc(*lenp);
if (*pp == NULL)
goto out;
Expand Down Expand Up @@ -417,6 +420,7 @@ procstat_freec18n(struct procstat *procstat __unused, void *p)
{
free(p);
}
#endif

struct filestat_list *
procstat_getfiles(struct procstat *procstat, struct kinfo_proc *kp, int mmapped)
Expand Down

0 comments on commit 363e20e

Please sign in to comment.