diff options
author | fbarrat <fbarrat@linux.ibm.com> | 2021-06-09 14:18:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 14:18:44 +0200 |
commit | 97a12b3caef7d059566a76f98631ed3176afdc03 (patch) | |
tree | 801bb03c863b28c7e63c87bfbb516a9bf15b7d4a | |
parent | acca9d9e59572ebc9477ac5338c1656e307dd2b7 (diff) | |
parent | 96acf6512dda2801bac75d8aa02ff3eb0e383ad6 (diff) |
Merge pull request #48 from fbarrat/docker
A few fixes
-rw-r--r-- | Doxyfile-html | 28 | ||||
-rw-r--r-- | Doxyfile-man | 28 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | src/afu.c | 4 | ||||
-rw-r--r-- | src/internal.c | 5 |
5 files changed, 12 insertions, 58 deletions
diff --git a/Doxyfile-html b/Doxyfile-html index 6a82d7e..fd23764 100644 --- a/Doxyfile-html +++ b/Doxyfile-html @@ -240,12 +240,6 @@ TAB_SIZE = 4 ALIASES = -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all @@ -1082,13 +1076,6 @@ VERBATIM_HEADERS = YES ALPHABETICAL_INDEX = YES -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored @@ -2148,12 +2135,6 @@ EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- @@ -2167,15 +2148,6 @@ PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. diff --git a/Doxyfile-man b/Doxyfile-man index 56d9c06..f3c33c8 100644 --- a/Doxyfile-man +++ b/Doxyfile-man @@ -240,12 +240,6 @@ TAB_SIZE = 4 ALIASES = -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For # instance, some of the names that are used will be different. The list of all @@ -1081,13 +1075,6 @@ VERBATIM_HEADERS = YES ALPHABETICAL_INDEX = YES -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - # In case all classes in a project start with a common prefix, all classes will # be put under the same header in the alphabetical index. The IGNORE_PREFIX tag # can be used to specify a prefix (or a list of prefixes) that should be ignored @@ -2147,12 +2134,6 @@ EXTERNAL_GROUPS = YES EXTERNAL_PAGES = YES -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of 'which perl'). -# The default file (with absolute path) is: /usr/bin/perl. - -PERL_PATH = /usr/bin/perl - #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- @@ -2166,15 +2147,6 @@ PERL_PATH = /usr/bin/perl CLASS_DIAGRAMS = YES -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see: -# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - # You can include diagrams made with dia in doxygen documentation. Doxygen will # then run dia to produce the diagram and insert it in the documentation. The # DIA_PATH tag allows you to specify the directory where the dia binary resides. @@ -98,6 +98,11 @@ The following environment variables may be set (to 1 or "YES") to assist with de **LIBOCXL_VERBOSE_ERRORS_ALL** Force verbose errors to be emitted for any failed LibOCXL calls, unless explicitly disabled. + +For testing and/or assist in various environments, the following environment variable can also be set: + +**LIBOCXL_SYSPATH** Override the default path (/sys/class/ocxl) used by the library to read driver information. + Patches may be submitted via Github pull requests. Please prepare your patches by running `make precommit` before committing your work, and addressing any warnings & errors reported. Patches must compile cleanly with the latest stable version of GCC to be accepted. @@ -343,9 +343,9 @@ static bool populate_metadata(dev_t dev, ocxl_afu *afu) } physical_function++; - uint16_t domain; + uint32_t domain; uint8_t bus, device, function; - int found = sscanf(physical_function, "%hu:%hhu:%hhu.%hhu.%hhu", + int found = sscanf(physical_function, "%x:%hhu:%hhu.%hhu.%hhu", &domain, &bus, &device, &function, &afu->identifier.afu_index); if (found != 5) { diff --git a/src/internal.c b/src/internal.c index 0dd8e91..07eaa9d 100644 --- a/src/internal.c +++ b/src/internal.c @@ -53,6 +53,7 @@ pthread_mutex_t stderr_mutex = PTHREAD_MUTEX_INITIALIZER; * - Check the LIBOCXL_INFO environment variable and output the info string * - Check the LIBOCXL_TRACE_ALL environment variable and enable tracing_all * - Check the LIBOCXL_VERBOSE_ERRORS_ALL environment variable and enable verbose_errors_all + * - Check the LIBOCXL_SYSPATH environment variable and override sys_path */ void libocxl_init() { @@ -81,6 +82,10 @@ void libocxl_init() verbose_errors = true; } + val = getenv("LIBOCXL_SYSPATH"); + if (val) + sys_path = val; + libocxl_inited = true; pthread_mutex_unlock(&libocxl_inited_mutex); |