Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
seq_file.h File Reference
#include <linux/types.h>
#include <linux/string.h>
#include <linux/bug.h>
#include <linux/mutex.h>
#include <linux/cpumask.h>
#include <linux/nodemask.h>

Go to the source code of this file.

Data Structures

struct  seq_file
 
struct  seq_operations
 

Macros

#define SEQ_SKIP   1
 
#define SEQ_START_TOKEN   ((void *)1)
 

Functions

charmangle_path (char *s, const char *p, const char *esc)
 
int seq_open (struct file *, const struct seq_operations *)
 
ssize_t seq_read (struct file *, char __user *, size_t, loff_t *)
 
loff_t seq_lseek (struct file *, loff_t, int)
 
int seq_release (struct inode *, struct file *)
 
int seq_escape (struct seq_file *, const char *, const char *)
 
int seq_putc (struct seq_file *m, char c)
 
int seq_puts (struct seq_file *m, const char *s)
 
int seq_write (struct seq_file *seq, const void *data, size_t len)
 
 __printf (2, 3) int seq_printf(struct seq_file *
 
const char __printf (2, 0) int seq_vprintf(struct seq_file *
 
int seq_path (struct seq_file *, const struct path *, const char *)
 
int seq_dentry (struct seq_file *, struct dentry *, const char *)
 
int seq_path_root (struct seq_file *m, const struct path *path, const struct path *root, const char *esc)
 
int seq_bitmap (struct seq_file *m, const unsigned long *bits, unsigned int nr_bits)
 
int seq_bitmap_list (struct seq_file *m, const unsigned long *bits, unsigned int nr_bits)
 
int single_open (struct file *, int(*)(struct seq_file *, void *), void *)
 
int single_release (struct inode *, struct file *)
 
void__seq_open_private (struct file *, const struct seq_operations *, int)
 
int seq_open_private (struct file *, const struct seq_operations *, int)
 
int seq_release_private (struct inode *, struct file *)
 
int seq_put_decimal_ull (struct seq_file *m, char delimiter, unsigned long long num)
 
int seq_put_decimal_ll (struct seq_file *m, char delimiter, long long num)
 
struct list_headseq_list_start (struct list_head *head, loff_t pos)
 
struct list_headseq_list_start_head (struct list_head *head, loff_t pos)
 
struct list_headseq_list_next (void *v, struct list_head *head, loff_t *ppos)
 
struct hlist_nodeseq_hlist_start (struct hlist_head *head, loff_t pos)
 
struct hlist_nodeseq_hlist_start_head (struct hlist_head *head, loff_t pos)
 
struct hlist_nodeseq_hlist_next (void *v, struct hlist_head *head, loff_t *ppos)
 
struct hlist_nodeseq_hlist_start_rcu (struct hlist_head *head, loff_t pos)
 
struct hlist_nodeseq_hlist_start_head_rcu (struct hlist_head *head, loff_t pos)
 
struct hlist_nodeseq_hlist_next_rcu (void *v, struct hlist_head *head, loff_t *ppos)
 

Variables

const char const char va_list args
 

Macro Definition Documentation

#define SEQ_SKIP   1

Definition at line 42 of file seq_file.h.

#define SEQ_START_TOKEN   ((void *)1)

Definition at line 145 of file seq_file.h.

Function Documentation

__printf ( ,
 
)
const char __printf ( ,
 
)
void* __seq_open_private ( struct file ,
const struct seq_operations ,
int   
)

Definition at line 621 of file seq_file.c.

char* mangle_path ( char s,
const char p,
const char esc 
)

mangle_path - mangle and copy path to buffer beginning : buffer start : beginning of path in above buffer : set of characters that need escaping

Copy the path from @p to @s, replacing each occurrence of character from
@esc with usual octal escape.
Returns pointer past last written character in @s, or NULL in case of
failure.

Definition at line 432 of file seq_file.c.

int seq_bitmap ( struct seq_file m,
const unsigned long bits,
unsigned int  nr_bits 
)

Definition at line 534 of file seq_file.c.

int seq_bitmap_list ( struct seq_file m,
const unsigned long bits,
unsigned int  nr_bits 
)

Definition at line 550 of file seq_file.c.

int seq_dentry ( struct seq_file ,
struct dentry ,
const char  
)

Definition at line 515 of file seq_file.c.

int seq_escape ( struct seq_file m,
const char s,
const char esc 
)

seq_escape - print string into buffer, escaping some characters : target buffer : string : set of characters that need escaping

Puts string into buffer, replacing each occurrence of character from with usual octal escape. Returns 0 in case of success, -1 - in case of overflow.

Definition at line 366 of file seq_file.c.

struct hlist_node* seq_hlist_next ( void v,
struct hlist_head head,
loff_t *  ppos 
)
read

seq_hlist_next - move to the next position of the hlist : the current iterator : the head of the hlist : the current position

Called at seq_file->op->next().

Definition at line 823 of file seq_file.c.

struct hlist_node* seq_hlist_next_rcu ( void v,
struct hlist_head head,
loff_t *  ppos 
)
read

seq_hlist_next_rcu - move to the next position of the hlist protected by RCU : the current iterator : the head of the hlist : the current position

Called at seq_file->op->next().

This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_head_rcu() as long as the traversal is guarded by rcu_read_lock().

Definition at line 893 of file seq_file.c.

struct hlist_node* seq_hlist_start ( struct hlist_head head,
loff_t  pos 
)
read

seq_hlist_start - start an iteration of a hlist : the head of the hlist : the start position of the sequence

Called at seq_file->op->start().

Definition at line 787 of file seq_file.c.

struct hlist_node* seq_hlist_start_head ( struct hlist_head head,
loff_t  pos 
)
read

seq_hlist_start_head - start an iteration of a hlist : the head of the hlist : the start position of the sequence

Called at seq_file->op->start(). Call this function if you want to print a header at the top of the output.

Definition at line 806 of file seq_file.c.

struct hlist_node* seq_hlist_start_head_rcu ( struct hlist_head head,
loff_t  pos 
)
read

seq_hlist_start_head_rcu - start an iteration of a hlist protected by RCU : the head of the hlist : the start position of the sequence

Called at seq_file->op->start(). Call this function if you want to print a header at the top of the output.

This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_head_rcu() as long as the traversal is guarded by rcu_read_lock().

Definition at line 871 of file seq_file.c.

struct hlist_node* seq_hlist_start_rcu ( struct hlist_head head,
loff_t  pos 
)
read

seq_hlist_start_rcu - start an iteration of a hlist protected by RCU : the head of the hlist : the start position of the sequence

Called at seq_file->op->start().

This list-traversal primitive may safely run concurrently with the _rcu list-mutation primitives such as hlist_add_head_rcu() as long as the traversal is guarded by rcu_read_lock().

Definition at line 847 of file seq_file.c.

struct list_head* seq_list_next ( void v,
struct list_head head,
loff_t *  ppos 
)
read

Definition at line 770 of file seq_file.c.

struct list_head* seq_list_start ( struct list_head head,
loff_t  pos 
)
read

Definition at line 749 of file seq_file.c.

struct list_head* seq_list_start_head ( struct list_head head,
loff_t  pos 
)
read

Definition at line 761 of file seq_file.c.

loff_t seq_lseek ( struct file ,
loff_t  ,
int   
)

Definition at line 303 of file seq_file.c.

int seq_open ( struct file ,
const struct seq_operations  
)

Definition at line 47 of file seq_file.c.

int seq_open_private ( struct file ,
const struct seq_operations ,
int   
)

Definition at line 647 of file seq_file.c.

int seq_path ( struct seq_file m,
const struct path path,
const char esc 
)

seq_path - seq_file interface to print a pathname : the seq_file handle : the struct path to print : set of characters to escape in the output

return the absolute path of 'path', as represented by the dentry / mnt pair in the path parameter.

Definition at line 462 of file seq_file.c.

int seq_path_root ( struct seq_file m,
const struct path path,
const struct path root,
const char esc 
)

Definition at line 485 of file seq_file.c.

int seq_put_decimal_ll ( struct seq_file m,
char  delimiter,
long long  num 
)

Definition at line 711 of file seq_file.c.

int seq_put_decimal_ull ( struct seq_file m,
char  delimiter,
unsigned long long  num 
)

Definition at line 684 of file seq_file.c.

int seq_putc ( struct seq_file m,
char  c 
)

Definition at line 654 of file seq_file.c.

int seq_puts ( struct seq_file m,
const char s 
)

Definition at line 664 of file seq_file.c.

ssize_t seq_read ( struct file ,
char __user ,
size_t  ,
loff_t *   
)

Definition at line 152 of file seq_file.c.

int seq_release ( struct inode ,
struct file  
)

Definition at line 347 of file seq_file.c.

int seq_release_private ( struct inode ,
struct file  
)

Definition at line 611 of file seq_file.c.

int seq_write ( struct seq_file seq,
const void data,
size_t  len 
)

seq_write - write arbitrary data to buffer : seq_file identifying the buffer to which data should be written : data address : number of bytes

Return 0 on success, non-zero otherwise.

Definition at line 737 of file seq_file.c.

int single_open ( struct file ,
int(*)(struct seq_file *, void *)  ,
void  
)

Definition at line 581 of file seq_file.c.

int single_release ( struct inode ,
struct file  
)

Definition at line 602 of file seq_file.c.

Variable Documentation

Definition at line 93 of file seq_file.h.