]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - libkmod/libkmod.h
Lookup aliases in the modules.builtin.modinfo
[thirdparty/kmod.git] / libkmod / libkmod.h
index 3397f87e43fb8d7327828851ba8535ecda3456fa..3cab2e521656d70aefad4d4933bd2fa2464d4a6c 100644 (file)
@@ -14,8 +14,7 @@
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
  */
 
 #pragma once
@@ -52,6 +51,7 @@ void kmod_set_log_priority(struct kmod_ctx *ctx, int priority);
 void *kmod_get_userdata(const struct kmod_ctx *ctx);
 void kmod_set_userdata(struct kmod_ctx *ctx, const void *userdata);
 
+const char *kmod_get_dirname(const struct kmod_ctx *ctx);
 
 /*
  * Management of libkmod's resources
@@ -70,9 +70,10 @@ enum kmod_index {
        KMOD_INDEX_MODULES_DEP = 0,
        KMOD_INDEX_MODULES_ALIAS,
        KMOD_INDEX_MODULES_SYMBOL,
+       KMOD_INDEX_MODULES_BUILTIN_ALIAS,
        KMOD_INDEX_MODULES_BUILTIN,
        /* Padding to make sure enum is not mapped to char */
-       _KMOD_INDEX_PAD = (1 << 31),
+       _KMOD_INDEX_PAD = 1U << 31,
 };
 int kmod_dump_index(struct kmod_ctx *ctx, enum kmod_index type, int fd);
 
@@ -140,7 +141,7 @@ struct kmod_module *kmod_module_get_module(const struct kmod_list *entry);
 /* Removal flags */
 enum kmod_remove {
        KMOD_REMOVE_FORCE = O_TRUNC,
-       KMOD_REMOVE_NOWAIT = O_NONBLOCK,
+       KMOD_REMOVE_NOWAIT = O_NONBLOCK, /* always set */
 };
 
 /* Insertion flags */
@@ -211,7 +212,7 @@ enum kmod_module_initstate {
        KMOD_MODULE_COMING,
        KMOD_MODULE_GOING,
        /* Padding to make sure enum is not mapped to char */
-       _KMOD_MODULE_PAD = (1 << 31),
+       _KMOD_MODULE_PAD = 1U << 31,
 };
 const char *kmod_module_initstate_str(enum kmod_module_initstate state);
 int kmod_module_get_initstate(const struct kmod_module *mod);