I want to make a module that print console, current folder name like pwd, but I don't know how with system calls ? or something else ? if system calls, what is the system call of that ? and how can I use this system call on my module.?

I want to make a module that print console, current folder name like pwd, but I don't know how with system calls ? or something else ? if system calls, what is the system call of that ? and how can I use this system call on my module.?

I'm pretty sure you can't use system calls in a kernel module.

if there is another way to print current folder name to conslole with a module. You can say it.

I also want to print system time or process list to console.

and İs there a way to change my thread title :) I forgot "print" "How can I print current folder name like pwd ?(Module Programming) "

if there is another way to print current folder name to conslole with a module. You can say it.

I also want to print system time or process list to console.

and İs there a way to change my thread title :) I forgot "print" "How can I print current folder name like pwd ?(Module Programming) "

i found to how print process list

/* ProcessList.c 
    Robert Love Chapter 3
    */
    #include < linux/kernel.h >
    #include < linux/sched.h >
    #include < linux/module.h >

    int init_module(void)
    {
    struct task_struct *task;
    for_each_process(task)
    {
    printk("%s [%d]\n",task->comm , task->pid);
    }
   
    return 0;
    }

   
    void cleanup_module(void)
    {
    printk(KERN_INFO "Cleaning Up.\n");


    }

probably there is a simple way like this to print current folder name