rem: struct my_stat    st; struct tm        *tm;
context: do_rmall(int argc, char **argv){    int               dirfd, err, fd, max_err = 10;    char              dirname[128], fname[512], buff[512];    size_t            len,count = 0;    struct my_dirent *dent;    struct my_stat    st;    struct tm        *tm;        dent = (struct my_dirent *)buff;    strcpy(dirname, "/myfs/");    if (argc > 1)        strcat(dirname, &argv[1][0]);    if ((dirfd = sys_opendir(1, -1, dirname, 0)) < 0) {        printf("dir: error opening: %s\n", dirname);        return;    }    while(1) {        len = 1;        err = sys_readdir(1, dirfd, dent, sizeof(buff), len);        if (err < 0) {            printf("readdir failed for: %s\n", dent->d_name);            if (max_err-- <= 0)                break;                        continue;        }                if (err == 0)            break;        if (strcmp(dent->d_name, "..") == 0 || strcmp(dent->d_name, ".") == 0)            continue;        sprintf(fname, "%s/%s", dirname, dent->d_name);        err = sys_unlink(1, -1, fname);        if (err != 0) {            printf("unlink failed for: %s (%ld)\n", fname, dent->d_ino);        } else	        count++;    }    if (err != 0) {        printf("readdir failed on: %s\n", dent->d_name);    }	printf("%ld files removed!n",count);    sys_closedir(1, dirfd);}