format files to comply with kernel coding standards, rename .config to config

This commit is contained in:
2025-08-13 19:45:11 +02:00
parent 2e4d67d510
commit cf0ab7f1db
10 changed files with 97 additions and 83 deletions

10
09/rw.c
View File

@ -1,3 +1,4 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
@ -21,17 +22,16 @@ int list_mounts(struct seq_file *m, void *v)
cur = current->nsproxy->mnt_ns->mnt_first_node;
buf = kmalloc(sizeof(char) * PATH_MAX, GFP_KERNEL);
while(cur)
{
while (cur) {
mnt = rb_entry(cur, struct mount, mnt_node);
struct path p = {
.mnt = &mnt->mnt,
.dentry = mnt->mnt.mnt_root,
.mnt = &mnt->mnt,
.dentry = mnt->mnt.mnt_root,
};
path = d_path(&p, buf, PATH_MAX);
if(IS_ERR(path))
if (IS_ERR(path))
path = 0;
seq_printf(m, "%-10s %s\n", mnt->mnt_devname, path);
cur = rb_next(cur);