Print type designator 'D' for the KF_TYPE_DEV files.
No type-specific data is provided by the kernel. Sponsored by: Mellanox Technologies MFC after: 1 week
This commit is contained in:
parent
abd55a4079
commit
fec90e1e9c
@ -588,6 +588,10 @@ procstat_getfiles_kvm(struct procstat *procstat, struct kinfo_proc *kp, int mmap
|
||||
type = PS_FST_TYPE_PROCDESC;
|
||||
data = file.f_data;
|
||||
break;
|
||||
case DTYPE_DEV:
|
||||
type = PS_FST_TYPE_DEV;
|
||||
data = file.f_data;
|
||||
break;
|
||||
default:
|
||||
continue;
|
||||
}
|
||||
@ -673,6 +677,7 @@ kinfo_type2fst(int kftype)
|
||||
} kftypes2fst[] = {
|
||||
{ KF_TYPE_PROCDESC, PS_FST_TYPE_PROCDESC },
|
||||
{ KF_TYPE_CRYPTO, PS_FST_TYPE_CRYPTO },
|
||||
{ KF_TYPE_DEV, PS_FST_TYPE_DEV },
|
||||
{ KF_TYPE_FIFO, PS_FST_TYPE_FIFO },
|
||||
{ KF_TYPE_KQUEUE, PS_FST_TYPE_KQUEUE },
|
||||
{ KF_TYPE_MQUEUE, PS_FST_TYPE_MQUEUE },
|
||||
|
@ -71,6 +71,7 @@
|
||||
#define PS_FST_TYPE_UNKNOWN 11
|
||||
#define PS_FST_TYPE_NONE 12
|
||||
#define PS_FST_TYPE_PROCDESC 13
|
||||
#define PS_FST_TYPE_DEV 14
|
||||
|
||||
/*
|
||||
* Special descriptor numbers.
|
||||
|
@ -301,6 +301,8 @@ print_file_info(struct procstat *procstat, struct filestat *fst,
|
||||
case PS_FST_TYPE_SEM:
|
||||
print_sem_info(procstat, fst);
|
||||
break;
|
||||
case PS_FST_TYPE_DEV:
|
||||
break;
|
||||
default:
|
||||
if (vflg)
|
||||
fprintf(stderr,
|
||||
|
@ -408,6 +408,11 @@ procstat_files(struct procstat *procstat, struct kinfo_proc *kipp)
|
||||
xo_emit("{eq:fd_type/procdesc}");
|
||||
break;
|
||||
|
||||
case PS_FST_TYPE_DEV:
|
||||
str = "D";
|
||||
xo_emit("{eq:fd_type/dev}");
|
||||
break;
|
||||
|
||||
case PS_FST_TYPE_NONE:
|
||||
str = "?";
|
||||
xo_emit("{eq:fd_type/none}");
|
||||
|
Loading…
Reference in New Issue
Block a user