-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change name of custom_functions.h #6
Comments
There's also the question of whether we want these functions to be defined in the header file like they are now, or if we want to put them in a c file instead. |
custom_functions.h lives in the component_library now. The |
Is there a reason we have the strcat2 function instead of just using strcat? |
Unfortunately, yes. Kernel source code can't use the std library functions since they are written for user space. https://kernelnewbies.org/FAQ/LibraryFunctionsInKernel However, it's entirely possible that there is already a kernel version of strcat available for use in the kernel source tree. If that's the case, it would be better to use that version instead of our (probably buggy) version. |
Given it is in string.h though shouldn't we be able to use it that way? |
Yes, you are correct. Whoever implemented the driver did not know that there is a kernel version of string.h that implements many of the functions in the user space string.h (located at /usr/include/string.h) Let's use include/linux/string.h |
There are probably other functions, such as strcpy, we could replace that I believe we are duplicating in our drivers. |
The file is really just fixed point to string and vice versa conversion funcitons. There is probably a name that better describes what the file is actually doing.
Changing the file name will necessitate changing the device driver autogen to reflect the new file name.
The text was updated successfully, but these errors were encountered: