Changeset 9646159 in mainline


Ignore:
Timestamp:
2009-02-21T11:44:24Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0cb9fa0
Parents:
5ad8661
Message:

Fix file size display when doing 'ls' of another directory.

Location:
uspace/app/bdsh/cmds/modules/ls
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/cmds/modules/ls/ls.c

    r5ad8661 r9646159  
    115115                        break;
    116116                case LS_FILE:
    117                         ls_print_file(dp->d_name);
     117                        ls_print_file(dp->d_name, buff);
    118118                        break;
    119119                case LS_BOGUS:
     
    144144}
    145145
    146 static void ls_print_file(const char *f)
    147 {
    148         printf("%-40s\t%llu\n", f, (long long) flen(f));
     146static void ls_print_file(const char *name, const char *pathname)
     147{
     148        printf("%-40s\t%llu\n", name, (long long) flen(pathname));
    149149
    150150        return;
     
    193193                return CMD_FAILURE;
    194194        case LS_FILE:
    195                 ls_print_file(buff);
     195                ls_print_file(buff, buff);
    196196                break;
    197197        case LS_DIR:
  • uspace/app/bdsh/cmds/modules/ls/ls.h

    r5ad8661 r9646159  
    1111static void ls_scan_dir(const char *, DIR *);
    1212static void ls_print_dir(const char *);
    13 static void ls_print_file(const char *);
     13static void ls_print_file(const char *, const char *);
    1414
    1515#endif /* LS_H */
Note: See TracChangeset for help on using the changeset viewer.