pkgsrc/sysutils/pidof/patches/patch-aa
mef e03831afa2 (sysutils/pidof) Updated 2.88sdf to 2.96, ChangeLog lines to large, omitted.
(..sysutils/pidof)% wc  ChangeLog-2.88sdf-2.96
     434    3459   22753 ChangeLog-2.88sdf-2.96

The last part is as below:

sysvinit (2.96) released; urgency=low

  [ Jesse Smith ]

    * Added -z command line paramter to pidof which tells pidof to
      try to find processes in uninterruptable (D) or zombie (Z) states.
      This can cause pidof to hang, but produces a more complete process
      list.
       Closes Savannah bug #56534

    * Reformatted init code to make if/while logic more clear.

    * Cleaned up some output from readbootlog.

    * Added -e flag to bootlogd. When -e is used, data saved
      to the boot log file does not have escape characters
      removed. This means colour and cursor movement codes
      stay in the log file. The may then look nicer when
      read with "less -R', but may appear cluttered or
      out of alignment when viewed with other, plain-text tools.
      When -e is not used, escape characters are removed/filtered.
      Closes Debian bug #672361.

    * Make sure src/Makefile cleans up all executable files
      when parent Makefile calls "make clean".
2019-12-31 13:55:14 +00:00

83 lines
1.8 KiB
Text

$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 <errno.h>
#include <getopt.h>
#include <limits.h>
+#ifdef linux
#include <mntent.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
@@ -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);