]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/seq_file.c
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / fs / seq_file.c
index 11c85fec6b4f60b25a83480adb77fa62f098d015..eba2eabcd2b86a40495845053d9d647e228540f9 100644 (file)
@@ -465,6 +465,22 @@ int seq_bitmap(struct seq_file *m, unsigned long *bits, unsigned int nr_bits)
 }
 EXPORT_SYMBOL(seq_bitmap);
 
+int seq_bitmap_list(struct seq_file *m, unsigned long *bits,
+               unsigned int nr_bits)
+{
+       if (m->count < m->size) {
+               int len = bitmap_scnlistprintf(m->buf + m->count,
+                               m->size - m->count, bits, nr_bits);
+               if (m->count + len < m->size) {
+                       m->count += len;
+                       return 0;
+               }
+       }
+       m->count = m->size;
+       return -1;
+}
+EXPORT_SYMBOL(seq_bitmap_list);
+
 static void *single_start(struct seq_file *p, loff_t *pos)
 {
        return NULL + (*pos == 0);