version 1.108, 2015/10/23 08:18:57 |
version 1.109, 2016/01/01 17:38:45 |
|
|
int Tflag = 0; |
int Tflag = 0; |
int repeatcount = 0; |
int repeatcount = 0; |
int proto = 0; |
int proto = 0; |
int need_nlist; |
int need_nlist, kvm_flags = O_RDONLY; |
|
|
af = AF_UNSPEC; |
af = AF_UNSPEC; |
tableid = getrtable(); |
tableid = getrtable(); |
|
|
* The remaining code may need kvm so lets try to open it. |
* The remaining code may need kvm so lets try to open it. |
* -r and -P are the only bits left that actually can use this. |
* -r and -P are the only bits left that actually can use this. |
*/ |
*/ |
need_nlist = nlistf != NULL || memf != NULL || Pflag || (Aflag && rflag); |
need_nlist = (nlistf != NULL) || (memf != NULL) || (Aflag && rflag); |
|
if (!need_nlist && !Pflag) |
|
kvm_flags |= KVM_NO_FILES; |
|
|
if ((kvmd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY | |
if ((kvmd = kvm_openfiles(nlistf, memf, NULL, kvm_flags, buf)) == NULL) |
(need_nlist ? 0 : KVM_NO_FILES), buf)) == NULL) |
|
errx(1, "kvm_openfiles: %s", buf); |
errx(1, "kvm_openfiles: %s", buf); |
|
|
if (need_nlist && (kvm_nlist(kvmd, nl) < 0 || nl[0].n_type == 0)) { |
if (need_nlist && (kvm_nlist(kvmd, nl) < 0 || nl[0].n_type == 0)) { |