blob: ef8744f7fe0ef0db34b1ab4fc0b9ba7987f142a9 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#include <linux/module.h>
2#include <linux/syscalls.h>
3
4#ifdef USE_CPPS_KO
5
6struct cpps_callbacks cpps_callbacks;
7EXPORT_SYMBOL(cpps_callbacks);
8
9int cpps_callbacks_register(struct cpps_callbacks *p_call)
10{
11 cpps_callbacks = *p_call;
12
13 return 0;
14}
15EXPORT_SYMBOL(cpps_callbacks_register);
16
17int cpps_callbacks_unregister(void)
18{
19 memset(&cpps_callbacks,0,sizeof(cpps_callbacks));
20
21 return 0;
22}
23EXPORT_SYMBOL(cpps_callbacks_unregister);
24
25struct cpps_globalModem cpps_global_var;
26EXPORT_SYMBOL(cpps_global_var);
27
28int cpps_globalVar_register(struct cpps_globalModem *p_var)
29{
30 cpps_global_var = *p_var;
31
32 return 0;
33}
34EXPORT_SYMBOL(cpps_globalVar_register);
35
36
37#endif /* USE_CPPS_KO */
38
39long kernel_sys_mount(char __user *dev_name, char __user *dir_name,
40 char __user *type, unsigned long flags,
41 void __user *data)
42{
43 return sys_mount(dev_name, dir_name, type, flags, data);
44}
45EXPORT_SYMBOL(kernel_sys_mount);
46
47long kernel_sys_umount(char __user *name, int flags)
48{
49 return sys_umount(name, flags);
50}
51EXPORT_SYMBOL(kernel_sys_umount);
52
53long kernel_sys_lseek(unsigned int fd, off_t offset,
54 unsigned int origin)
55{
56 return sys_lseek(fd, offset, origin);
57}
58EXPORT_SYMBOL(kernel_sys_lseek);
59
60long kernel_sys_unlink(const char __user *pathname)
61{
62 return sys_unlink(pathname);
63}
64EXPORT_SYMBOL(kernel_sys_unlink);
65
66long kernel_sys_fsync(unsigned int fd)
67{
68 return sys_fsync(fd);
69}
70EXPORT_SYMBOL(kernel_sys_fsync);
71
72long kernel_sys_rename(const char __user *oldname,
73 const char __user *newname)
74{
75 return sys_rename(oldname, newname);
76}
77EXPORT_SYMBOL(kernel_sys_rename);
78
79long kernel_sys_read(unsigned int fd, char __user *buf, size_t count)
80{
81 return sys_read(fd, buf, count);
82}
83EXPORT_SYMBOL(kernel_sys_read);
84
85long kernel_sys_write(unsigned int fd, const char __user *buf,
86 size_t count)
87{
88 return sys_write(fd, buf, count);
89}
90EXPORT_SYMBOL(kernel_sys_write);
91
92long kernel_sys_mkdir(const char __user *pathname, umode_t mode)
93{
94 return sys_mkdir(pathname, mode);
95}
96EXPORT_SYMBOL(kernel_sys_mkdir);
97
98long kernel_sys_getcwd(char __user *buf, unsigned long size)
99{
100 return sys_getcwd(buf, size);
101}
102EXPORT_SYMBOL(kernel_sys_getcwd);
103
104long kernel_sys_ftruncate(unsigned int fd, unsigned long length)
105{
106 return sys_ftruncate(fd, length);
107}
108EXPORT_SYMBOL(kernel_sys_ftruncate);
109
110long kernel_sys_newstat(const char __user *filename,
111 struct stat __user *statbuf)
112{
113 return sys_newstat(filename, statbuf);
114}
115EXPORT_SYMBOL(kernel_sys_newstat);
116
117long kernel_sys_getdents(unsigned int fd,
118 struct linux_dirent __user *dirent,
119 unsigned int count)
120{
121 return sys_getdents(fd, dirent, count);
122}
123EXPORT_SYMBOL(kernel_sys_getdents);
124
125long kernel_sys_chdir(const char __user *filename)
126{
127 return sys_chdir(filename);
128}
129EXPORT_SYMBOL(kernel_sys_chdir);
130
131long kernel_sys_rmdir(const char __user *pathname)
132{
133 return sys_rmdir(pathname);
134}
135EXPORT_SYMBOL(kernel_sys_rmdir);
136
137long kernel_sys_newfstat(unsigned int fd, struct stat __user *statbuf)
138{
139 return sys_newfstat(fd, statbuf);
140}
141EXPORT_SYMBOL(kernel_sys_newfstat);
142
143long kernel_sys_sync(void)
144{
145 return sys_sync();
146}
147EXPORT_SYMBOL(kernel_sys_sync);
148
149long kernel_sys_chmod(const char __user *filename, umode_t mode)
150{
151 return sys_chmod(filename, mode);
152}
153EXPORT_SYMBOL(kernel_sys_chmod);
154
155long kernel_sys_open(const char __user *filename,
156 int flags, umode_t mode)
157{
158 return sys_open(filename, flags, mode);
159}
160EXPORT_SYMBOL(kernel_sys_open);
161
xf.liaa4d92f2023-09-13 00:18:58 -0700162long kernel_sys_ioctl(const char __user *filename, unsigned int cmd,
163 unsigned long arg)
164{
165 return sys_ioctl(filename,cmd,arg);
166}
167EXPORT_SYMBOL(kernel_sys_ioctl);
168
lh9ed821d2023-04-07 01:36:19 -0700169long kernel_sys_access(const char __user *filename, int mode)
170{
171 return sys_access(filename, mode);
172}
173EXPORT_SYMBOL(kernel_sys_access);
174
175long kernel_sys_statfs(const char __user * path,
176 struct statfs __user *buf)
177{
178 return sys_statfs(path, buf);
179}
180EXPORT_SYMBOL(kernel_sys_statfs);
181
182long kernel_sys_creat(const char __user *pathname, umode_t mode)
183{
184 return sys_creat(pathname, mode);
185}
186EXPORT_SYMBOL(kernel_sys_creat);
187
188long kernel_sys_close(unsigned int fd)
189{
190 return sys_close(fd);
191}
192EXPORT_SYMBOL(kernel_sys_close);
193
194/*
195ERROR: "sys_lseek" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
196ERROR: "sys_unlink" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
197ERROR: "sys_fsync" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
198ERROR: "sys_rename" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
199ERROR: "sys_read" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
200ERROR: "sys_write" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
201ERROR: "sys_mkdir" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
202ERROR: "sys_getcwd" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
203ERROR: "sys_ftruncate" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
204ERROR: "sys_newstat" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
205ERROR: "sys_getdents" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
206ERROR: "sys_chdir" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
207ERROR: "sys_rmdir" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
208ERROR: "sys_newfstat" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
209ERROR: "sys_sync" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
210ERROR: "sys_chmod" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
211ERROR: "sys_open" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
212ERROR: "sys_access" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
213ERROR: "sys_statfs" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
214ERROR: "sys_creat" [drivers/cpkodemo/cpkodemo.ko.ko] undefined!
215*/