|
|
538efe |
From d7836fb0a7131c725e3c02be7e48e99c671637c3 Mon Sep 17 00:00:00 2001
|
|
|
538efe |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
538efe |
Date: Thu, 12 Dec 2019 08:57:15 +0000
|
|
|
538efe |
Subject: [PATCH 01/19] server: Allow -D nbdkit.* debug flags for the core
|
|
|
538efe |
server.
|
|
|
538efe |
|
|
|
538efe |
These work like plugin/filter debug flags, but apply to the internals
|
|
|
538efe |
of the server.
|
|
|
538efe |
|
|
|
538efe |
(cherry picked from commit 3b45db234a691f8ff926a6fef583e11c3601f112)
|
|
|
538efe |
---
|
|
|
538efe |
docs/nbdkit.pod | 7 +++++++
|
|
|
538efe |
docs/synopsis.txt | 2 +-
|
|
|
538efe |
server/main.c | 3 +++
|
|
|
538efe |
server/nbdkit.syms | 2 ++
|
|
|
538efe |
4 files changed, 13 insertions(+), 1 deletion(-)
|
|
|
538efe |
|
|
|
538efe |
diff --git a/docs/nbdkit.pod b/docs/nbdkit.pod
|
|
|
538efe |
index a2e72b13..346d8332 100644
|
|
|
538efe |
--- a/docs/nbdkit.pod
|
|
|
538efe |
+++ b/docs/nbdkit.pod
|
|
|
538efe |
@@ -177,6 +177,13 @@ Display brief command line usage information and exit.
|
|
|
538efe |
Set the plugin or filter Debug Flag called C<FLAG> to the integer
|
|
|
538efe |
value C<N>. See L<nbdkit-plugin(3)/Debug Flags>.
|
|
|
538efe |
|
|
|
538efe |
+=item B<-D> nbdkit.FLAG=N
|
|
|
538efe |
+
|
|
|
538efe |
+=item B<--debug> nbdkit.FLAG=N
|
|
|
538efe |
+
|
|
|
538efe |
+Set the nbdkit server Debug Flag called C<FLAG> to the integer value
|
|
|
538efe |
+C<N>.
|
|
|
538efe |
+
|
|
|
538efe |
=item B<--dump-config>
|
|
|
538efe |
|
|
|
538efe |
Dump out the compile-time configuration values and exit.
|
|
|
538efe |
diff --git a/docs/synopsis.txt b/docs/synopsis.txt
|
|
|
538efe |
index 3c239373..c3675422 100644
|
|
|
538efe |
--- a/docs/synopsis.txt
|
|
|
538efe |
+++ b/docs/synopsis.txt
|
|
|
538efe |
@@ -1,4 +1,4 @@
|
|
|
538efe |
-nbdkit [-D|--debug PLUGIN|FILTER.FLAG=N]
|
|
|
538efe |
+nbdkit [-D|--debug PLUGIN|FILTER|nbdkit.FLAG=N]
|
|
|
538efe |
[-e|--exportname EXPORTNAME] [--exit-with-parent]
|
|
|
538efe |
[--filter FILTER ...] [-f|--foreground]
|
|
|
538efe |
[-g|--group GROUP] [-i|--ipaddr IPADDR]
|
|
|
538efe |
diff --git a/server/main.c b/server/main.c
|
|
|
538efe |
index d39941b1..11ba1e6d 100644
|
|
|
538efe |
--- a/server/main.c
|
|
|
538efe |
+++ b/server/main.c
|
|
|
538efe |
@@ -563,6 +563,9 @@ main (int argc, char *argv[])
|
|
|
538efe |
free (t);
|
|
|
538efe |
}
|
|
|
538efe |
|
|
|
538efe |
+ /* Apply nbdkit.* flags for the server. */
|
|
|
538efe |
+ apply_debug_flags (NULL, "nbdkit");
|
|
|
538efe |
+
|
|
|
538efe |
/* Check all debug flags were used, and free them. */
|
|
|
538efe |
free_debug_flags ();
|
|
|
538efe |
|
|
|
538efe |
diff --git a/server/nbdkit.syms b/server/nbdkit.syms
|
|
|
538efe |
index 390972e2..96c22c07 100644
|
|
|
538efe |
--- a/server/nbdkit.syms
|
|
|
538efe |
+++ b/server/nbdkit.syms
|
|
|
538efe |
@@ -67,6 +67,8 @@
|
|
|
538efe |
nbdkit_vdebug;
|
|
|
538efe |
nbdkit_verror;
|
|
|
538efe |
|
|
|
538efe |
+ nbdkit_debug_*;
|
|
|
538efe |
+
|
|
|
538efe |
# Everything else is hidden.
|
|
|
538efe |
local: *;
|
|
|
538efe |
};
|
|
|
538efe |
--
|
|
|
538efe |
2.18.2
|
|
|
538efe |
|