本文整理汇总了C++中seq_printf函数的典型用法代码示例。如果您正苦于以下问题:C++ seq_printf函数的具体用法?C++ seq_printf怎么用?C++ seq_printf使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了seq_printf函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: acpi_processor_power_seq_show
static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_processor *pr = seq->private;
unsigned int i;
if (!pr)
goto end;
seq_printf(seq, "active state: C%zd\n"
"max_cstate: C%d\n"
"maximum allowed latency: %d usec\n",
pr->power.state ? pr->power.state - pr->power.states : 0,
max_cstate, pm_qos_requirement(PM_QOS_CPU_DMA_LATENCY));
seq_puts(seq, "states:\n");
for (i = 1; i <= pr->power.count; i++) {
seq_printf(seq, " %cC%d: ",
(&pr->power.states[i] ==
pr->power.state ? '*' : ' '), i);
if (!pr->power.states[i].valid) {
seq_puts(seq, "<not supported>\n");
continue;
}
switch (pr->power.states[i].type) {
case ACPI_STATE_C1:
seq_printf(seq, "type[C1] ");
break;
case ACPI_STATE_C2:
seq_printf(seq, "type[C2] ");
break;
case ACPI_STATE_C3:
seq_printf(seq, "type[C3] ");
break;
default:
seq_printf(seq, "type[--] ");
break;
}
if (pr->power.states[i].promotion.state)
seq_printf(seq, "promotion[C%zd] ",
(pr->power.states[i].promotion.state -
pr->power.states));
else
seq_puts(seq, "promotion[--] ");
if (pr->power.states[i].demotion.state)
seq_printf(seq, "demotion[C%zd] ",
(pr->power.states[i].demotion.state -
pr->power.states));
else
seq_puts(seq, "demotion[--] ");
seq_printf(seq, "latency[%03d] usage[%08d] duration[%020llu]\n",
pr->power.states[i].latency,
pr->power.states[i].usage,
(unsigned long long)pr->power.states[i].time);
}
end:
return 0;
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel-m3,代码行数:65,代码来源:processor_idle.c
示例2: mdfld_dc_pipeline_b_regs_info
static int mdfld_dc_pipeline_b_regs_info(struct seq_file *m, void *data)
{
struct drm_info_node *node = (struct drm_info_node *)m->private;
struct drm_device *dev = node->minor->dev;
int i;
seq_printf(m, "DISPLAY PIPELINE B\n");
seq_printf(m, "\tPALETTE B:\n");
seq_printf(m, "\t\t reg(0xa800) = 0x%x\n", REG_READ(0xa800));
seq_printf(m, "\tPIPELINE B:\n");
for (i=0x61000; i<0x610ff; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tHDMI PORT CONTROL/HDCP/TV:\n");
for (i=0x61110; i<=0x61178; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tPANEL FITTING:\n");
for (i=0x61200; i<0x612ff; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tPIPELINE B CONTROL:\n");
for (i=0x71000; i<0x710ff; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
return 0;
}
开发者ID:nel82,项目名称:android_zenfone4_JB,代码行数:29,代码来源:mdfld_debugfs.c
示例3: task_mem
/*
* Logic: we've got two memory sums for each process, "shared", and
* "non-shared". Shared memory may get counted more than once, for
* each process that owns it. Non-shared memory is counted
* accurately.
*/
void task_mem(struct seq_file *m, struct mm_struct *mm)
{
struct vm_area_struct *vma;
struct vm_region *region;
struct rb_node *p;
unsigned long bytes = 0, sbytes = 0, slack = 0, size;
down_read(&mm->mmap_sem);
for (p = rb_first(&mm->mm_rb); p; p = rb_next(p)) {
vma = rb_entry(p, struct vm_area_struct, vm_rb);
bytes += kobjsize(vma);
region = vma->vm_region;
if (region) {
size = kobjsize(region);
size += region->vm_end - region->vm_start;
} else {
size = vma->vm_end - vma->vm_start;
}
if (atomic_read(&mm->mm_count) > 1 ||
vma->vm_flags & VM_MAYSHARE) {
sbytes += size;
} else {
bytes += size;
if (region)
slack = region->vm_end - vma->vm_end;
}
}
if (atomic_read(&mm->mm_count) > 1)
sbytes += kobjsize(mm);
else
bytes += kobjsize(mm);
if (current->fs && current->fs->users > 1)
sbytes += kobjsize(current->fs);
else
bytes += kobjsize(current->fs);
if (current->files && atomic_read(¤t->files->count) > 1)
sbytes += kobjsize(current->files);
else
bytes += kobjsize(current->files);
if (current->sighand && atomic_read(¤t->sighand->count) > 1)
sbytes += kobjsize(current->sighand);
else
bytes += kobjsize(current->sighand);
bytes += kobjsize(current); /* includes kernel stack */
seq_printf(m,
"Mem:\t%8lu bytes\n"
"Slack:\t%8lu bytes\n"
"Shared:\t%8lu bytes\n",
bytes, slack, sbytes);
up_read(&mm->mmap_sem);
}
开发者ID:020gzh,项目名称:linux,代码行数:67,代码来源:task_nommu.c
示例4: wandev_show
static int wandev_show(struct seq_file *m, void *v)
{
struct wan_device *wandev = m->private;
if (wandev->magic != ROUTER_MAGIC)
return 0;
if (!wandev->state) {
seq_puts(m, "device is not configured!\n");
return 0;
}
/* Update device statistics */
if (wandev->update) {
int err = wandev->update(wandev);
if (err == -EAGAIN) {
seq_puts(m, "Device is busy!\n");
return 0;
}
if (err) {
seq_puts(m, "Device is not configured!\n");
return 0;
}
}
seq_printf(m, PROC_STATS_FORMAT,
"total packets received", wandev->stats.rx_packets);
seq_printf(m, PROC_STATS_FORMAT,
"total packets transmitted", wandev->stats.tx_packets);
seq_printf(m, PROC_STATS_FORMAT,
"total bytes received", wandev->stats.rx_bytes);
seq_printf(m, PROC_STATS_FORMAT,
"total bytes transmitted", wandev->stats.tx_bytes);
seq_printf(m, PROC_STATS_FORMAT,
"bad packets received", wandev->stats.rx_errors);
seq_printf(m, PROC_STATS_FORMAT,
"packet transmit problems", wandev->stats.tx_errors);
seq_printf(m, PROC_STATS_FORMAT,
"received frames dropped", wandev->stats.rx_dropped);
seq_printf(m, PROC_STATS_FORMAT,
"transmit frames dropped", wandev->stats.tx_dropped);
seq_printf(m, PROC_STATS_FORMAT,
"multicast packets received", wandev->stats.multicast);
seq_printf(m, PROC_STATS_FORMAT,
"transmit collisions", wandev->stats.collisions);
seq_printf(m, PROC_STATS_FORMAT,
"receive length errors", wandev->stats.rx_length_errors);
seq_printf(m, PROC_STATS_FORMAT,
"receiver overrun errors", wandev->stats.rx_over_errors);
seq_printf(m, PROC_STATS_FORMAT,
"CRC errors", wandev->stats.rx_crc_errors);
seq_printf(m, PROC_STATS_FORMAT,
"frame format errors (aborts)", wandev->stats.rx_frame_errors);
seq_printf(m, PROC_STATS_FORMAT,
"receiver fifo overrun", wandev->stats.rx_fifo_errors);
seq_printf(m, PROC_STATS_FORMAT,
"receiver missed packet", wandev->stats.rx_missed_errors);
seq_printf(m, PROC_STATS_FORMAT,
"aborted frames transmitted", wandev->stats.tx_aborted_errors);
return 0;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:61,代码来源:wanproc.c
示例5: mdfld_dc_pipeline_c_regs_info
static int mdfld_dc_pipeline_c_regs_info(struct seq_file *m, void *data)
{
struct drm_info_node *node = (struct drm_info_node *)m->private;
struct drm_device *dev = node->minor->dev;
int i;
seq_printf(m, "DISPLAY PIPELINE C\n");
seq_printf(m, "\tPALETTE C:\n");
seq_printf(m, "\t\t reg(0xac00) = 0x%x\n", REG_READ(0xac00));
seq_printf(m, "\tMIPI C:\n");
for (i=0xb800; i<0xb8ff; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tDSI ADAPTER:\n");
for (i=0xb904; i<=0xb938; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tPIPELINE C:\n");
for (i=0x62000; i<0x620ff; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tPORT CONTROL:\n");
for (i=0x62190; i<0x62194; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
seq_printf(m, "\tPIPELINE C CONTROL:\n");
for (i=0x72000; i<0x720ff; i+=4)
seq_printf(m, "\t\t reg(0x%x) = 0x%x\n", i, REG_READ(i));
return 0;
}
开发者ID:nel82,项目名称:android_zenfone4_JB,代码行数:32,代码来源:mdfld_debugfs.c
示例6: proc_fasttimer_show
static int proc_fasttimer_show(struct seq_file *m, void *v)
{
unsigned long flags;
int i = 0;
int num_to_show;
struct fasttime_t tv;
struct fast_timer *t, *nextt;
do_gettimeofday_fast(&tv);
seq_printf(m, "Fast timers added: %i\n", fast_timers_added);
seq_printf(m, "Fast timers started: %i\n", fast_timers_started);
seq_printf(m, "Fast timer interrupts: %i\n", fast_timer_ints);
seq_printf(m, "Fast timers expired: %i\n", fast_timers_expired);
seq_printf(m, "Fast timers deleted: %i\n", fast_timers_deleted);
seq_printf(m, "Fast timer running: %s\n",
fast_timer_running ? "yes" : "no");
seq_printf(m, "Current time: %lu.%06lu\n",
(unsigned long)tv.tv_jiff,
(unsigned long)tv.tv_usec);
#ifdef FAST_TIMER_SANITY_CHECKS
seq_printf(m, "Sanity failed: %i\n", sanity_failed);
#endif
seq_putc(m, '\n');
#ifdef DEBUG_LOG_INCLUDED
{
int end_i = debug_log_cnt;
i = 0;
if (debug_log_cnt_wrapped)
i = debug_log_cnt;
while (i != end_i || debug_log_cnt_wrapped) {
seq_printf(m, debug_log_string[i], debug_log_value[i]);
if (seq_has_overflowed(m))
return 0;
i = (i+1) % DEBUG_LOG_MAX;
}
}
seq_putc(m, '\n');
#endif
num_to_show = (fast_timers_started < NUM_TIMER_STATS ? fast_timers_started:
NUM_TIMER_STATS);
seq_printf(m, "Timers started: %i\n", fast_timers_started);
for (i = 0; i < num_to_show; i++) {
int cur = (fast_timers_started - i - 1) % NUM_TIMER_STATS;
#if 1 //ndef FAST_TIMER_LOG
seq_printf(m, "div: %i freq: %i delay: %i\n",
timer_div_settings[cur],
timer_freq_settings[cur],
timer_delay_settings[cur]);
#endif
#ifdef FAST_TIMER_LOG
t = &timer_started_log[cur];
seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
t->name,
(unsigned long)t->tv_set.tv_jiff,
(unsigned long)t->tv_set.tv_usec,
(unsigned long)t->tv_expires.tv_jiff,
(unsigned long)t->tv_expires.tv_usec,
t->delay_us,
t->data);
if (seq_has_overflowed(m))
return 0;
#endif
}
seq_putc(m, '\n');
#ifdef FAST_TIMER_LOG
num_to_show = (fast_timers_added < NUM_TIMER_STATS ? fast_timers_added:
NUM_TIMER_STATS);
seq_printf(m, "Timers added: %i\n", fast_timers_added);
for (i = 0; i < num_to_show; i++) {
t = &timer_added_log[(fast_timers_added - i - 1) % NUM_TIMER_STATS];
seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
t->name,
(unsigned long)t->tv_set.tv_jiff,
(unsigned long)t->tv_set.tv_usec,
(unsigned long)t->tv_expires.tv_jiff,
(unsigned long)t->tv_expires.tv_usec,
t->delay_us,
t->data);
if (seq_has_overflowed(m))
return 0;
}
seq_putc(m, '\n');
num_to_show = (fast_timers_expired < NUM_TIMER_STATS ? fast_timers_expired:
NUM_TIMER_STATS);
seq_printf(m, "Timers expired: %i\n", fast_timers_expired);
for (i = 0; i < num_to_show; i++) {
t = &timer_expired_log[(fast_timers_expired - i - 1) % NUM_TIMER_STATS];
seq_printf(m, "%-14s s: %6lu.%06lu e: %6lu.%06lu d: %6li us data: 0x%08lX\n",
t->name,
(unsigned long)t->tv_set.tv_jiff,
(unsigned long)t->tv_set.tv_usec,
(unsigned long)t->tv_expires.tv_jiff,
//.........这里部分代码省略.........
开发者ID:12zz,项目名称:linux,代码行数:101,代码来源:fasttimer.c
示例7: bm_proc_dummy_product_type_show
static int bm_proc_dummy_product_type_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%d\n", PRODUCT_AS2K_3200);
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例8: bm_proc_dummy_board_type_show
static int bm_proc_dummy_board_type_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%d\n", PPAL_BOARD_TYPE_DUMMY);
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例9: bm_proc_dummy_snmp_sys_oid_show
static int bm_proc_dummy_snmp_sys_oid_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "dummy");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例10: bm_proc_dummy_admin_passwd_show
static int bm_proc_dummy_admin_passwd_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "dummy_user");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例11: bm_proc_dummy_enterprise_name_show
static int bm_proc_dummy_enterprise_name_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "AUTELAN");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:6,代码来源:bmk_dummy_product.c
示例12: bm_proc_dummy_software_name_show
static int bm_proc_dummy_software_name_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "Auteware");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例13: bm_proc_dummy_product_base_mac_addr_show
static int bm_proc_dummy_product_base_mac_addr_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "000A7AFE0106");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例14: profiling_events_show_human_readable
static int profiling_events_show_human_readable(struct seq_file *seq_file, void *v)
{
#define MALI_EVENT_ID_IS_HW(event_id) (((event_id & 0x00FF0000) >= MALI_PROFILING_EVENT_CHANNEL_GP0) && ((event_id & 0x00FF0000) <= MALI_PROFILING_EVENT_CHANNEL_PP7))
static u64 start_time = 0;
loff_t *spos = v;
u32 index;
u64 timestamp;
u32 event_id;
u32 data[5];
index = (u32)*spos;
/* Retrieve all events */
if (_MALI_OSK_ERR_OK == _mali_internal_profiling_get_event(index, ×tamp, &event_id, data)) {
seq_printf(seq_file, "%llu %u %u %u %u %u %u # ", timestamp, event_id, data[0], data[1], data[2], data[3], data[4]);
if (0 == index) {
start_time = timestamp;
}
seq_printf(seq_file, "[%06u] ", index);
switch(event_id & 0x0F000000) {
case MALI_PROFILING_EVENT_TYPE_SINGLE:
seq_printf(seq_file, "SINGLE | ");
break;
case MALI_PROFILING_EVENT_TYPE_START:
seq_printf(seq_file, "START | ");
break;
case MALI_PROFILING_EVENT_TYPE_STOP:
seq_printf(seq_file, "STOP | ");
break;
case MALI_PROFILING_EVENT_TYPE_SUSPEND:
seq_printf(seq_file, "SUSPEND | ");
break;
case MALI_PROFILING_EVENT_TYPE_RESUME:
seq_printf(seq_file, "RESUME | ");
break;
default:
seq_printf(seq_file, "0x%01X | ", (event_id & 0x0F000000) >> 24);
break;
}
switch(event_id & 0x00FF0000) {
case MALI_PROFILING_EVENT_CHANNEL_SOFTWARE:
seq_printf(seq_file, "SW | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_GP0:
seq_printf(seq_file, "GP0 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP0:
seq_printf(seq_file, "PP0 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP1:
seq_printf(seq_file, "PP1 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP2:
seq_printf(seq_file, "PP2 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP3:
seq_printf(seq_file, "PP3 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP4:
seq_printf(seq_file, "PP4 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP5:
seq_printf(seq_file, "PP5 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP6:
seq_printf(seq_file, "PP6 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_PP7:
seq_printf(seq_file, "PP7 | ");
break;
case MALI_PROFILING_EVENT_CHANNEL_GPU:
seq_printf(seq_file, "GPU | ");
break;
default:
seq_printf(seq_file, "0x%02X | ", (event_id & 0x00FF0000) >> 16);
break;
}
if (MALI_EVENT_ID_IS_HW(event_id)) {
if (((event_id & 0x0F000000) == MALI_PROFILING_EVENT_TYPE_START) || ((event_id & 0x0F000000) == MALI_PROFILING_EVENT_TYPE_STOP)) {
switch(event_id & 0x0000FFFF) {
case MALI_PROFILING_EVENT_REASON_START_STOP_HW_PHYSICAL:
seq_printf(seq_file, "PHYSICAL | ");
break;
case MALI_PROFILING_EVENT_REASON_START_STOP_HW_VIRTUAL:
seq_printf(seq_file, "VIRTUAL | ");
break;
default:
seq_printf(seq_file, "0x%04X | ", event_id & 0x0000FFFF);
break;
}
} else {
seq_printf(seq_file, "0x%04X | ", event_id & 0x0000FFFF);
}
} else {
//.........这里部分代码省略.........
开发者ID:codesnake,项目名称:kernel_amlogic_meson-common,代码行数:101,代码来源:mali_kernel_sysfs.c
示例15: bm_proc_dummy_master_slot_id_show
static int bm_proc_dummy_master_slot_id_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%d\n", 1);
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例16: seq_proc_show
static int seq_proc_show(struct seq_file *s,void *v)
{
return seq_printf(s,"%s\n","it is a test!");
}
开发者ID:feisonzl,项目名称:drivers,代码行数:4,代码来源:proc_seq.c
示例17: bm_proc_dummy_module_name_show
static int bm_proc_dummy_module_name_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "dummy_module");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例18: version_proc_show
static int version_proc_show(struct seq_file *m, void *v)
{
seq_printf(m, "driver: %s\n", TOSHIBA_ACPI_VERSION);
seq_printf(m, "proc_interface: %d\n", PROC_INTERFACE_VERSION);
return 0;
}
开发者ID:Astralix,项目名称:mainline-dss11,代码行数:6,代码来源:toshiba_acpi.c
示例19: bm_proc_dummy_product_sn_show
static int bm_proc_dummy_product_sn_show(struct seq_file *file, void *ptr)
{
seq_printf(file, "%s\n", "1000");
return 0;
}
开发者ID:ECYBTech,项目名称:chanos,代码行数:5,代码来源:bmk_dummy_product.c
示例20: dccp_print_conntrack
static void dccp_print_conntrack(struct seq_file *s, struct nf_conn *ct)
{
seq_printf(s, "%s ", dccp_state_names[ct->proto.dccp.state]);
}
开发者ID:Ayokunle,项目名称:linux,代码行数:4,代码来源:nf_conntrack_proto_dccp.c
注:本文中的seq_printf函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论