• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/kernel/trace/

Lines Matching refs:cnt

477 	size_t cnt, loff_t *ppos)
491 cnt--;
499 while (cnt && isspace(ch)) {
504 cnt--;
518 while (cnt && !isspace(ch)) {
529 cnt--;
548 ssize_t trace_seq_to_user(struct trace_seq *s, char __user *ubuf, size_t cnt)
553 if (!cnt)
560 if (cnt > len)
561 cnt = len;
562 ret = copy_to_user(ubuf, s->buffer + s->readpos, cnt);
563 if (ret == cnt)
566 cnt -= ret;
568 s->readpos += cnt;
569 return cnt;
572 static ssize_t trace_seq_to_buffer(struct trace_seq *s, void *buf, size_t cnt)
581 if (cnt > len)
582 cnt = len;
583 ret = memcpy(buf, s->buffer + s->readpos, cnt);
587 s->readpos += cnt;
588 return cnt;
2520 size_t cnt, loff_t *ppos)
2528 if (cnt >= sizeof(buf))
2531 if (copy_from_user(&buf, ubuf, cnt))
2534 buf[cnt] = 0;
2558 *ppos += cnt;
2560 return cnt;
2598 size_t cnt, loff_t *ppos)
2600 return simple_read_from_buffer(ubuf, cnt, ppos,
2612 size_t cnt, loff_t *ppos)
2646 len = simple_read_from_buffer(ubuf, cnt, ppos,
2663 size_t cnt, loff_t *ppos)
2669 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
2674 size_t cnt, loff_t *ppos)
2681 if (cnt >= sizeof(buf))
2684 if (copy_from_user(&buf, ubuf, cnt))
2687 buf[cnt] = 0;
2711 *ppos += cnt;
2713 return cnt;
2718 size_t cnt, loff_t *ppos)
2730 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
2888 size_t cnt, loff_t *ppos)
2895 ret = cnt;
2897 if (cnt > MAX_TRACER_SIZE)
2898 cnt = MAX_TRACER_SIZE;
2900 if (copy_from_user(&buf, ubuf, cnt))
2903 buf[cnt] = 0;
2906 for (i = cnt - 1; i > 0 && isspace(buf[i]); i--)
2920 size_t cnt, loff_t *ppos)
2930 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
2935 size_t cnt, loff_t *ppos)
2942 if (cnt >= sizeof(buf))
2945 if (copy_from_user(&buf, ubuf, cnt))
2948 buf[cnt] = 0;
2956 return cnt;
3133 size_t cnt, loff_t *ppos)
3140 sret = trace_seq_to_user(&iter->seq, ubuf, cnt);
3161 sret = iter->trace->read(iter, filp, ubuf, cnt, ppos);
3177 if (cnt >= PAGE_SIZE)
3178 cnt = PAGE_SIZE - 1;
3201 if (iter->seq.len >= cnt)
3208 sret = trace_seq_to_user(&iter->seq, ubuf, cnt);
3375 size_t cnt, loff_t *ppos)
3390 return simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
3395 size_t cnt, loff_t *ppos)
3401 if (cnt >= sizeof(buf))
3404 if (copy_from_user(&buf, ubuf, cnt))
3407 buf[cnt] = 0;
3435 cnt = ret;
3440 *ppos += cnt;
3444 cnt = -ENOMEM;
3456 return cnt;
3471 size_t cnt, loff_t *fpos)
3479 if (cnt > TRACE_BUF_SIZE)
3480 cnt = TRACE_BUF_SIZE;
3482 buf = kmalloc(cnt + 2, GFP_KERNEL);
3486 if (copy_from_user(buf, ubuf, cnt)) {
3490 if (buf[cnt-1] != '\n') {
3491 buf[cnt] = '\n';
3492 buf[cnt+1] = '\0';
3494 buf[cnt] = '\0';
3501 if (written > cnt)
3502 written = cnt;
3522 size_t cnt, loff_t *fpos)
3528 if (cnt >= sizeof(buf))
3531 if (copy_from_user(&buf, ubuf, cnt))
3534 buf[cnt] = 0;
3555 *fpos += cnt;
3557 return cnt;
3886 unsigned long cnt;
3894 cnt = ring_buffer_entries_cpu(tr->buffer, cpu);
3895 trace_seq_printf(s, "entries: %ld\n", cnt);
3897 cnt = ring_buffer_overrun_cpu(tr->buffer, cpu);
3898 trace_seq_printf(s, "overrun: %ld\n", cnt);
3900 cnt = ring_buffer_commit_overrun_cpu(tr->buffer, cpu);
3901 trace_seq_printf(s, "commit overrun: %ld\n", cnt);
3925 size_t cnt, loff_t *ppos)
3940 r = simple_read_from_buffer(ubuf, cnt, ppos, buf, r);
4047 trace_options_read(struct file *filp, char __user *ubuf, size_t cnt,
4058 return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2);
4062 trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt,
4070 if (cnt >= sizeof(buf))
4073 if (copy_from_user(&buf, ubuf, cnt))
4076 buf[cnt] = 0;
4094 *ppos += cnt;
4096 return cnt;
4108 trace_options_core_read(struct file *filp, char __user *ubuf, size_t cnt,
4119 return simple_read_from_buffer(ubuf, cnt, ppos, buf, 2);
4123 trace_options_core_write(struct file *filp, const char __user *ubuf, size_t cnt,
4131 if (cnt >= sizeof(buf))
4134 if (copy_from_user(&buf, ubuf, cnt))
4137 buf[cnt] = 0;
4147 *ppos += cnt;
4149 return cnt;
4221 int cnt;
4233 for (cnt = 0; opts[cnt].name; cnt++)
4236 topts = kcalloc(cnt + 1, sizeof(*topts), GFP_KERNEL);
4240 for (cnt = 0; opts[cnt].name; cnt++)
4241 create_trace_option_file(&topts[cnt], flags,
4242 &opts[cnt]);
4250 int cnt;
4255 for (cnt = 0; topts[cnt].opt; cnt++) {
4256 if (topts[cnt].entry)
4257 debugfs_remove(topts[cnt].entry);
4434 int cnt = 0, cpu;
4489 if (!cnt)
4492 cnt++;
4512 if (!cnt)