diff options
Diffstat (limited to 'rust/helpers.c')
-rw-r--r-- | rust/helpers.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/helpers.c b/rust/helpers.c index 81e80261d597..bb594da56137 100644 --- a/rust/helpers.c +++ b/rust/helpers.c @@ -21,6 +21,7 @@ #include <linux/bug.h> #include <linux/build_bug.h> #include <linux/err.h> +#include <linux/errname.h> #include <linux/refcount.h> #include <linux/mutex.h> #include <linux/spinlock.h> @@ -110,6 +111,12 @@ long rust_helper_PTR_ERR(__force const void *ptr) } EXPORT_SYMBOL_GPL(rust_helper_PTR_ERR); +const char *rust_helper_errname(int err) +{ + return errname(err); +} +EXPORT_SYMBOL_GPL(rust_helper_errname); + struct task_struct *rust_helper_get_current(void) { return current; |