]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
doc: Do not hardcode default location for config files
authorDaniel Wagner <dwagner@suse.de>
Wed, 29 Mar 2023 15:14:05 +0000 (17:14 +0200)
committerDaniel Wagner <wagi@monom.org>
Thu, 30 Mar 2023 06:46:41 +0000 (08:46 +0200)
The location of the config files is depending of the configuration.
Because we ship pre-compiled documentation the SYSCONFDIR might not be
correct.

Avoid confusion and just point out they live under SYSCONFDIR.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
doc/meson.build
src/nvme/fabrics.h

index 60a92ed421a95174a105ab6978b58ffce9bc2d12..edbc3be137ea1ad7cc1896e9d085aff006945a2c 100644 (file)
@@ -53,24 +53,17 @@ test('kdoc', kernel_doc_check, args: api_paths)
 
 if want_docs != 'false'
 
-  conf = configuration_data()
-  conf.set('SYSCONFDIR', sysconfdir)
-
   if want_docs == 'all' or want_docs == 'man'
     mandir = join_paths(get_option('mandir'), 'man2')
     list_man_pages = find_program('list-man-pages.sh')
     if want_docs_build
       foreach apif : api_paths
-        subst = configure_file(
-            input: apif,
-            output: '@BASENAME@.subst',
-            configuration: conf)
-        c = run_command(list_man_pages, subst, check: true)
+        c = run_command(list_man_pages, apif, check: true)
         man_pages = c.stdout().split()
         foreach page : man_pages
           custom_target(
             page.underscorify() + '_man',
-            input: subst,
+            input: apif,
             output: page + '.2',
             capture: true,
             command: [kernel_doc,
@@ -78,7 +71,7 @@ if want_docs != 'false'
                       '-man',
                       '-function',
                       page,
-                      subst],
+                      apif],
             install: true,
             install_dir: mandir)
         endforeach
index 9298f7b342a07e439eeb0e056bc19e96af0ee95b..3664a858282ff9a0c9a39e5e29d4a9a73303cbea 100644 (file)
@@ -257,7 +257,11 @@ char *nvmf_hostnqn_generate();
 
 /**
  * nvmf_hostnqn_from_file() - Reads the host nvm qualified name from the config
- *                           default location in @SYSCONFDIR@/nvme/
+ *                           default location
+ *
+ * Retrieve the qualified name from the config file located in $SYSCONFIDR/nvme.
+ * $SYSCONFDIR is usually /etc.
+ *
  * Return: The host nqn, or NULL if unsuccessful. If found, the caller
  * is responsible to free the string.
  */
@@ -265,7 +269,11 @@ char *nvmf_hostnqn_from_file();
 
 /**
  * nvmf_hostid_from_file() - Reads the host identifier from the config default
- *                          location in @SYSCONFDIR@/nvme/.
+ *                          location
+ *
+ * Retrieve the host idenditifer from the config file located in $SYSCONFDIR/nvme/.
+ * $SYSCONFDIR is usually /etc.
+ *
  * Return: The host identifier, or NULL if unsuccessful. If found, the caller
  *        is responsible to free the string.
  */