Messages in this thread | | | Date | Wed, 13 Mar 2002 16:46:00 -0800 (PST) | From | David Oleszkiewicz <> | Subject | Re: [module/patch] optional /proc/patches ?? |
| |
I played around with this a while ago and ended up writing some code which i might be able to find if you'd like. I took a different approach:
Have a script wrap around the patch command to just generate a log file of the patches that wre applied. (eg linux/patchlog.txt) Then on kernel build, when we build the whole include/config hierarchy you can have a script or program take that log and create a header file out of it. The header file creates a data structure similar to your struct patch_list_elem patchlist[]. That way, when you are patching the kernel you aren't dynamically patching some data structure file somewhere. I found using th md5 checksum of the file to be useful. Your module code can then take that header file and export it's information via /proc. I found this useful for a little while, but realized that setting the EXTRAVERSION variable in the main Makefile was good enough for me. This could be more useful in an enterprise environment though, when service people sweep in to debunk a kernel they can easily see what patches were applied, even if the kernel source was hidden by a sneaky sys admin who wants to get his money's worth on his service contract by making things difficult. :>.
> All, > > I was wondering whether something like a /proc/patches might be useful. > This could help list patches applied to a kernel such that "uname -a" and "cat > /proc/patches" provides some good information about the kernel, > especially stock kernels from distributions. I was able to work up a quick module > available at the link below. NOTE: I couldn't solve how to add entries > fo a patchlist structure using regular context diffs, but ed diffs work > just great. More information in the README attached. I'd very much appreciate > any feedback on whether this is useful and how it should actually be > implemented, if at all. Please note that my only access to lkml traffic is via Kernel > Traffic so I would appreciate being Cc'ed. > > Thanks all, > > -Erik (humble linux aficionado) > > [patchlist module] > http://ekline.com/linux/patchlist-0.0.1.tar.gz
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |