seq_file: Rename seq_overflow() to seq_has_overflowed() and make public
[deliverable/linux.git] / include / linux / seq_file.h
index 52e0097f61f00108f0faec9b37c57c2f03e1fcb2..cf6a9daaaf6d670eda5ae59495649099c455dd5c 100644 (file)
@@ -42,6 +42,21 @@ struct seq_operations {
 
 #define SEQ_SKIP 1
 
+/**
+ * seq_has_overflowed - check if the buffer has overflowed
+ * @m: the seq_file handle
+ *
+ * seq_files have a buffer which may overflow. When this happens a larger
+ * buffer is reallocated and all the data will be printed again.
+ * The overflow state is true when m->count == m->size.
+ *
+ * Returns true if the buffer received more than it can hold.
+ */
+static inline bool seq_has_overflowed(struct seq_file *m)
+{
+       return m->count == m->size;
+}
+
 /**
  * seq_get_buf - get buffer to write arbitrary data to
  * @m: the seq_file handle
This page took 0.02676 seconds and 5 git commands to generate.