Changeset 544a2e4 in mainline for uspace/app/top/screen.c


Ignore:
Timestamp:
2011-05-30T21:37:43Z (14 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7b712b60
Parents:
18ba2e4f (diff), 0743493a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/top/screen.c

    r18ba2e4f r544a2e4  
    254254        uint64_t used;
    255255        uint64_t free;
    256         char total_suffix;
    257         char unavail_suffix;
    258         char used_suffix;
    259         char free_suffix;
    260        
    261         order_suffix(data->physmem->total, &total, &total_suffix);
    262         order_suffix(data->physmem->unavail, &unavail, &unavail_suffix);
    263         order_suffix(data->physmem->used, &used, &used_suffix);
    264         order_suffix(data->physmem->free, &free, &free_suffix);
    265        
    266         printf("memory: %" PRIu64 "%c total, %" PRIu64 "%c unavail, %"
    267             PRIu64 "%c used, %" PRIu64 "%c free", total, total_suffix,
     256        const char *total_suffix;
     257        const char *unavail_suffix;
     258        const char *used_suffix;
     259        const char *free_suffix;
     260       
     261        bin_order_suffix(data->physmem->total, &total, &total_suffix, false);
     262        bin_order_suffix(data->physmem->unavail, &unavail, &unavail_suffix, false);
     263        bin_order_suffix(data->physmem->used, &used, &used_suffix, false);
     264        bin_order_suffix(data->physmem->free, &free, &free_suffix, false);
     265       
     266        printf("memory: %" PRIu64 "%s total, %" PRIu64 "%s unavail, %"
     267            PRIu64 "%s used, %" PRIu64 "%s free", total, total_suffix,
    268268            unavail, unavail_suffix, used, used_suffix, free, free_suffix);
    269269        screen_newline();
     
    295295               
    296296                uint64_t resmem;
    297                 char resmem_suffix;
    298                 order_suffix(task->resmem, &resmem, &resmem_suffix);
     297                const char *resmem_suffix;
     298                bin_order_suffix(task->resmem, &resmem, &resmem_suffix, true);
    299299               
    300300                uint64_t virtmem;
    301                 char virtmem_suffix;
    302                 order_suffix(task->virtmem, &virtmem, &virtmem_suffix);
    303                
    304                 printf("%-8" PRIu64 " %7zu %9" PRIu64 "%c ",
     301                const char *virtmem_suffix;
     302                bin_order_suffix(task->virtmem, &virtmem, &virtmem_suffix, true);
     303               
     304                printf("%-8" PRIu64 " %7zu %7" PRIu64 "%s ",
    305305                    task->task_id, task->threads, resmem, resmem_suffix);
    306306                print_percent(perc->resmem, 2);
    307                 printf(" %8" PRIu64 "%c ", virtmem, virtmem_suffix);
     307                printf(" %6" PRIu64 "%s ", virtmem, virtmem_suffix);
    308308                print_percent(perc->virtmem, 2);
    309309                puts(" ");
Note: See TracChangeset for help on using the changeset viewer.