From 6554022ddfcff741a57c54e2ee5228d8b8170097 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Thu, 23 Oct 2014 17:30:17 -0400 Subject: [PATCH] Add patch to allow afsd to do nothing and exit(0) --- ...-exit-command-for-afsd-to-do-nothing.patch | 31 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 32 insertions(+) create mode 100644 debian/patches/0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch diff --git a/debian/patches/0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch b/debian/patches/0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch new file mode 100644 index 000000000..5f1534e50 --- /dev/null +++ b/debian/patches/0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch @@ -0,0 +1,31 @@ +From: Benjamin Kaduk +Date: Thu, 23 Oct 2014 17:28:43 -0400 +Subject: Add dummy -exit command for afsd to do nothing + +--- + src/afsd/afsd.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c +index 141dc69..ab8e560 100644 +--- a/src/afsd/afsd.c ++++ b/src/afsd/afsd.c +@@ -1909,6 +1909,10 @@ mainproc(struct cmd_syndesc *as, void *arock) + /* -rxmaxfrags */ + rxmaxfrags = atoi(as->parms[38].items->data); + } ++ if (as->parms[39].items) { ++ /* -exit */ ++ exit(0); ++ } + + /* parse cacheinfo file if this is a diskcache */ + if (ParseCacheInfoFile()) { +@@ -2588,6 +2592,7 @@ afsd_init(void) + cmd_AddParm(ts, "-rxmaxfrags", CMD_SINGLE, CMD_OPTIONAL, + "Set the maximum number of UDP fragments Rx should send/receive" + " per Rx packet"); ++ cmd_AddParm(ts, "-exit", CMD_FLAG, CMD_OPTIONAL, "exit immediately"); + } + + int diff --git a/debian/patches/series b/debian/patches/series index 5d00dbe02..a55c8fbc1 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-userok.c-Fix-fixed-size-on-stack-path-buffers.patch 0002-Tweak-AFSDIR_PATH_MAX-definition.patch +0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch -- 2.39.5