Re: Deleting a file from within the kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).




--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux