Changeset 9646159 in mainline for uspace/app/bdsh/cmds/modules/ls/ls.c


Ignore:
Timestamp:
2009-02-21T11:44:24Z (16 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.

File:
1 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:
Note: See TracChangeset for help on using the changeset viewer.