Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8439729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:04:53+00:00 2026-06-10T08:04:53+00:00

#include <linux/version.h> #include <linux/kernel.h> #include <linux/jiffies.h> #include <linux/module.h> #include <linux/interrupt.h> #include <linux/fs.h> #include <linux/types.h>

  • 0
#include <linux/version.h>
#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/socket.h>
#include <linux/errno.h>
#include <linux/fcntl.h>
#include <linux/in.h>
#include <linux/init.h>
#include <linux/miscdevice.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/io.h>

#include <linux/mm.h>
#include <net/checksum.h>
#include <linux/cdev.h>

    static int t_open(struct inode *inode, struct file *filp)
    {
        return nonseekable_open(inode, filp);
    }


    static struct file_operations testmod_fops = {
        .open = t_open,
        .owner = THIS_MODULE
    };


    static struct miscdevice testmod_miscdev = {
        MISC_DYNAMIC_MINOR,
        "my_module",  
        &testmod_fops,
    }; 





    static int __init testmod_init(void)
    { 
        printk("module is on\n");
        misc_register(&testmod_miscdev);

        return 0;


    };

    static void __exit testmod_exit(void)
    {
        printk("about exit \n");
        misc_deregister(&testmod_miscdev);
    }





    module_init(testmod_init);
    module_exit(testmod_exit);
    MODULE_LICENSE("GPL");
    MODULE_AUTHOR("0x90");
    MODULE_DESCRIPTION("my_module");

why do I get the errno2 in this simple example?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:04:54+00:00Added an answer on June 10, 2026 at 8:04 am

    Basically you’d have to enter the internal module name and not the file name. You can find the module name by typing lsmod.

    So

    rmmod <your_module_name> should work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am talking about Intel 32-bit platform. Linux kernel version 2.6.31-14. #include <stdio.h> #include
I m developing program usin IPC socket communication between socket under linux (kernel version
Before Linux kernel 2.6, super_operations (include/linux/fs.h) have both read_inode and write_inode functions. But newer
In Linux, to create a socket we include the sys/socket.h header file and use
Is it possible to compile a linux kernel(2.6) module that includes functionality defined by
On a freshly installed Ubuntu , i found kernel headers in both /usr/include/linux ,
I am developing a Linux kernel module (driver) for an embedded system in the
I writing toolchain.cmake file for Linaro toolchain. include(CMakeForceCompiler) set(CMAKE_CROSSCOMPILING TRUE) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1)
On Linux, with 16 GB of RAM, why would the following segfault: #include <stdlib.h> #define
I am compiling a kernel module, containing a structure of size 34, using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.