format code

This commit is contained in:
2025-04-23 23:07:22 +08:00
parent 3c7b6c2126
commit f012b549d2
3 changed files with 4 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <unistd.h>
int main() {
int fd = open("/dev/wendy_out", O_RDONLY);

View File

@@ -1,7 +1,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
int main() {
int fd = open("/dev/wendy_in", O_WRONLY);

View File

@@ -165,7 +165,8 @@ const struct file_operations mypipe_fops = {.owner = THIS_MODULE,
.release = mypipe_release};
// Used to set the permission to allow any user to r/w
static int mypipe_uevent(const struct device *dev, struct kobj_uevent_env *env) {
static int mypipe_uevent(const struct device *dev,
struct kobj_uevent_env *env) {
add_uevent_var(env, "DEVMODE=%#o", 0666);
return 0;
}