morpheus-base

morpheus base system
git clone git://git.2f30.org/morpheus-base
Log | Files | Refs

rm.c (289B)


      1 /* See LICENSE file for copyright and license details. */
      2 #include <stdio.h>
      3 
      4 #include "../fs.h"
      5 #include "../util.h"
      6 
      7 int rm_fflag = 0;
      8 int rm_rflag = 0;
      9 
     10 void
     11 rm(const char *path)
     12 {
     13 	if (rm_rflag)
     14 		recurse(path, rm);
     15 	if (remove(path) < 0 && !rm_fflag)
     16 		eprintf("remove %s:", path);
     17 }