Reverting mknod
Eric Blake
ebb9@byu.net
Mon Apr 23 13:23:00 GMT 2007
According to Michael Ambrus on 4/23/2007 7:06 AM:
> What does the standard say should be the opposite of mknod?
>
> Or in other words: how do I remove a file of any type?
remove() will delete any file type (by either calling unlink or rmdir as
appropriate).
>
> I thought it would be unlink, but I'm not certain and the info at
> opengroup doesn't seem to support it.
Actually, according to opengroup, unlink is required to work on all file
types except directories, and on some implementations, it even works on
directories (although with superuser privileges, and even then you
shouldn't normally do that, as it can lead to filesystem corruption).
--
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 311 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/newlib/attachments/20070423/5ffbcbb3/attachment.sig>
More information about the Newlib
mailing list