* 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
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
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);
/* Removal flags */
enum kmod_remove {
KMOD_REMOVE_FORCE = O_TRUNC,
- KMOD_REMOVE_NOWAIT = O_NONBLOCK,
+ KMOD_REMOVE_NOWAIT = O_NONBLOCK, /* always set */
};
/* Insertion flags */
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);