Revert "misc seq_printf fixes for 4.4"
This reverts commit5c7566a29b
. This patch revert some changes in net/netfilter/xt_qtaguid.c as well. I'll submit another patch to restore those changes. Change-Id: I2d9251867235a6566b4c676de0546ce046848c91 CRs-Fixed: 1035969 Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Git-commit:cdb6973ae1
Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Bryse Flowers <bflowers@codeaurora.org>
This commit is contained in:
parent
9b9d994aa4
commit
859dc4e658
3 changed files with 8 additions and 7 deletions
|
@ -55,8 +55,7 @@ static int uid_stat_atomic_int_show(struct seq_file *m, void *v)
|
||||||
atomic_t *counter = m->private;
|
atomic_t *counter = m->private;
|
||||||
|
|
||||||
bytes = (unsigned int) (atomic_read(counter) + INT_MIN);
|
bytes = (unsigned int) (atomic_read(counter) + INT_MIN);
|
||||||
seq_printf(m, "%u\n", bytes);
|
return seq_printf(m, "%u\n", bytes);
|
||||||
return seq_has_overflowed(m) ? -ENOSPC : 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int uid_stat_read_atomic_int_open(struct inode *inode, struct file *file)
|
static int uid_stat_read_atomic_int_open(struct inode *inode, struct file *file)
|
||||||
|
|
|
@ -63,13 +63,14 @@ void activity_stats_update(void)
|
||||||
static int activity_stats_show(struct seq_file *m, void *v)
|
static int activity_stats_show(struct seq_file *m, void *v)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
int ret;
|
||||||
|
|
||||||
seq_printf(m, "Min Bucket(sec) Count\n");
|
seq_printf(m, "Min Bucket(sec) Count\n");
|
||||||
|
|
||||||
for (i = 0; i < BUCKET_MAX; i++) {
|
for (i = 0; i < BUCKET_MAX; i++) {
|
||||||
seq_printf(m, "%15d %lu\n", 1 << i, activity_stats[i]);
|
ret = seq_printf(m, "%15d %lu\n", 1 << i, activity_stats[i]);
|
||||||
if (seq_has_overflowed(m))
|
if (ret)
|
||||||
return -ENOSPC;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -2543,6 +2543,7 @@ static void pp_stats_header(struct seq_file *m)
|
||||||
static int pp_stats_line(struct seq_file *m, struct tag_stat *ts_entry,
|
static int pp_stats_line(struct seq_file *m, struct tag_stat *ts_entry,
|
||||||
int cnt_set)
|
int cnt_set)
|
||||||
{
|
{
|
||||||
|
int ret;
|
||||||
struct data_counters *cnts;
|
struct data_counters *cnts;
|
||||||
tag_t tag = ts_entry->tn.tag;
|
tag_t tag = ts_entry->tn.tag;
|
||||||
uid_t stat_uid = get_uid_from_tag(tag);
|
uid_t stat_uid = get_uid_from_tag(tag);
|
||||||
|
@ -2561,7 +2562,7 @@ static int pp_stats_line(struct seq_file *m, struct tag_stat *ts_entry,
|
||||||
}
|
}
|
||||||
ppi->item_index++;
|
ppi->item_index++;
|
||||||
cnts = &ts_entry->counters;
|
cnts = &ts_entry->counters;
|
||||||
seq_printf(m, "%d %s 0x%llx %u %u "
|
ret = seq_printf(m, "%d %s 0x%llx %u %u "
|
||||||
"%llu %llu "
|
"%llu %llu "
|
||||||
"%llu %llu "
|
"%llu %llu "
|
||||||
"%llu %llu "
|
"%llu %llu "
|
||||||
|
@ -2591,7 +2592,7 @@ static int pp_stats_line(struct seq_file *m, struct tag_stat *ts_entry,
|
||||||
cnts->bpc[cnt_set][IFS_TX][IFS_UDP].packets,
|
cnts->bpc[cnt_set][IFS_TX][IFS_UDP].packets,
|
||||||
cnts->bpc[cnt_set][IFS_TX][IFS_PROTO_OTHER].bytes,
|
cnts->bpc[cnt_set][IFS_TX][IFS_PROTO_OTHER].bytes,
|
||||||
cnts->bpc[cnt_set][IFS_TX][IFS_PROTO_OTHER].packets);
|
cnts->bpc[cnt_set][IFS_TX][IFS_PROTO_OTHER].packets);
|
||||||
return seq_has_overflowed(m) ? -ENOSPC : 1;
|
return ret ?: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool pp_sets(struct seq_file *m, struct tag_stat *ts_entry)
|
static bool pp_sets(struct seq_file *m, struct tag_stat *ts_entry)
|
||||||
|
|
Loading…
Add table
Reference in a new issue