$NetBSD: patch-aa,v 1.2 2019/12/31 13:55:14 mef Exp $ Disable the NFS code --- src/killall5.c.orig 2019-09-12 02:43:12.000000000 +0900 +++ src/killall5.c 2019-12-31 22:43:43.093313776 +0900 @@ -44,7 +44,9 @@ #include #include #include +#ifdef linux #include +#endif #include #include #include @@ -253,6 +255,7 @@ static inline int isnetfs(const char * t return 0; } +#ifdef linux /* * Remember all NFS typed partitions. */ @@ -318,6 +321,7 @@ void init_nfs(void) } endmntent(mnt); } +#endif /* linux */ static void clear_shadow(SHADOW *restrict shadow) { @@ -396,6 +400,7 @@ static int maxsymlinks(void) return v; } +#ifdef linux /* * Check path is located on a network based partition. */ @@ -465,6 +470,7 @@ int check4nfs(const char * path, char * return 0; } +#endif /* linux */ int readarg(FILE *fp, char *buf, int sz) { @@ -683,10 +689,12 @@ int readproc(int do_stat) p->nfs = 0; switch (do_stat) { +#ifdef linux case DO_NETFS: if ((p->nfs = check4nfs(path, buf))) goto link; /* else fall through */ +#endif case DO_STAT: if (stat(path, &st) != 0) { char * ptr; @@ -806,8 +814,10 @@ PIDQ_HEAD *pidof(char *prog) if (prog[0] == '/') { memset(&real[0], 0, sizeof(real)); +#ifdef linux if (check4nfs(prog, real)) nfs++; +#endif if (real[0] != '\0') prog = &real[0]; /* Binary located on network FS. */ @@ -1089,8 +1099,10 @@ int main_pidof(int argc, char **argv) } } +#ifdef linux if (flags & PIDOF_NETFS) init_nfs(); /* Which network based FS are online? */ +#endif /* Print out process-ID's one by one. */ readproc((flags & PIDOF_NETFS) ? DO_NETFS : DO_STAT);