Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 84439d7 in mainline for uspace/app/top/screen.c


Ignore:
Timestamp:
2010-12-05T09:34:46Z (11 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master
Children:
75732da
Parents:
56b962d (diff), 35537a7 (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 with development/

File:
1 edited

Legend:

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

    r56b962d r84439d7  
    150150        screen_get_pos(&c, &r);
    151151       
    152         if (c < cols)
    153                 printf("%.*s", cols - c - 1, str);
     152        if (c < cols) {
     153                int pos = cols - c - 1;
     154                printf("%.*s", pos, str);
     155        }
    154156}
    155157
    156158static inline void print_global_head(data_t *data)
    157159{
    158         printf("top - %02lu:%02lu:%02lu up %u days, %02u:%02u:%02u, load average:",
     160        printf("top - %02lu:%02lu:%02lu up "
     161            "%" PRIun " days, %02" PRIun ":%02" PRIun ":%02" PRIun ", "
     162            "load average:",
    159163            data->hours, data->minutes, data->seconds,
    160164            data->udays, data->uhours, data->uminutes, data->useconds);
     
    171175static inline void print_task_summary(data_t *data)
    172176{
    173         printf("tasks: %u total", data->tasks_count);
     177        printf("tasks: %zu total", data->tasks_count);
    174178        screen_newline();
    175179}
     
    211215        }
    212216       
    213         printf("threads: %u total, %u running, %u ready, %u sleeping, %u lingering, "
    214             "%u other, %u invalid",
     217        printf("threads: %zu total, %zu running, %zu ready, "
     218            "%zu sleeping, %zu lingering, %zu other, %zu invalid",
    215219            total, running, ready, sleeping, lingering, other, invalid);
    216220        screen_newline();
     
    295299                order_suffix(task->virtmem, &virtmem, &virtmem_suffix);
    296300               
    297                 printf("%-8" PRIu64 " %9u %8" PRIu64 "%c ", task->task_id,
     301                printf("%-8" PRIu64 " %9zu %8" PRIu64 "%c ", task->task_id,
    298302                    task->threads, virtmem, virtmem_suffix);
    299303                print_percent(perc->virtmem, 2);
Note: See TracChangeset for help on using the changeset viewer.