> On Thu, 2005-04-21 at 21:09 +0200, Tomas Telensky wrote: > > > On Thu, 2005-04-21 at 13:38 -0500, Tony.Asleson@xxxxxxxxxxxxxxxx wrote: > > > > How do you delete a file while in the kernel? > > > > > > > > I can find numerous examples of how to open/create/close a file within > > > > the kernel like http://uqconnect.net/~zzoklan/lkd/using_files.html , but > > > > I have been unable to find a resource on how to delete a file. I would > > > > really > > > > like a filp_unlink to go along with the filp_open, filp_close etc. > > > > > > > > I know doing any of these things is discouraged, but please don't respond > > > > with don't do it :-) > > > > > > sure... "You can't do that". > > > > ??? That's a nonsense. > > > > Of course you can. Kernel can do everything what the machine can do... > > to delete a file you need both the parent directory and the namespace it > belongs in. Kernel mode has no such namespace realistically (or rather a > standardized one that doesn't have to be the same one userspace apps > have). What do you mean with namespace? What do you need it for? All you should need is the pathname. Tomas > > > > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ -- "No Software Patents!" -- Allowing patents over software ideas will seriously affect the Creativity, Productivity and Freedom of all. Link: http://www.nosoftwarepatents.com/ -- Defend your freedom by signing a petition. Link: http://petition.eurolinux.org/index_html?LANG=en -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/