/branches/dynload/uspace/app/bdsh/input.c |
---|
94,7 → 94,6 |
return rc; |
} |
/* Borrowed from Jiri Svoboda's 'cli' uspace app */ |
static void read_line(char *buffer, int n) |
{ |
char c; |
114,8 → 113,10 |
} |
continue; |
} |
putchar(c); |
buffer[chars++] = c; |
if (c >= ' ') { |
putchar(c); |
buffer[chars++] = c; |
} |
} |
putchar('\n'); |
buffer[chars] = '\0'; |
/branches/dynload/uspace/app/bdsh/cmds/modules/ls/ls.c |
---|
114,7 → 114,7 |
ls_print_dir(dp->d_name); |
break; |
case LS_FILE: |
ls_print_file(dp->d_name); |
ls_print_file(dp->d_name, buff); |
break; |
case LS_BOGUS: |
/* Odd chance it was deleted from the time readdir() found |
143,9 → 143,9 |
return; |
} |
static void ls_print_file(const char *f) |
static void ls_print_file(const char *name, const char *pathname) |
{ |
printf("%-40s\t%llu\n", f, (long long) flen(f)); |
printf("%-40s\t%llu\n", name, (long long) flen(pathname)); |
return; |
} |
192,7 → 192,7 |
free(buff); |
return CMD_FAILURE; |
case LS_FILE: |
ls_print_file(buff); |
ls_print_file(buff, buff); |
break; |
case LS_DIR: |
dirp = opendir(buff); |
/branches/dynload/uspace/app/bdsh/cmds/modules/ls/ls.h |
---|
10,7 → 10,7 |
static unsigned int ls_scope(const char *); |
static void ls_scan_dir(const char *, DIR *); |
static void ls_print_dir(const char *); |
static void ls_print_file(const char *); |
static void ls_print_file(const char *, const char *); |
#endif /* LS_H */ |