Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
seq_file.c File Reference
#include <linux/fs.h>
#include <linux/export.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include <linux/cred.h>
#include <asm/uaccess.h>
#include <asm/page.h>

Go to the source code of this file.

Functions

int seq_open (struct file *file, const struct seq_operations *op)
 
 EXPORT_SYMBOL (seq_open)
 
ssize_t seq_read (struct file *file, char __user *buf, size_t size, loff_t *ppos)
 
 EXPORT_SYMBOL (seq_read)
 
loff_t seq_lseek (struct file *file, loff_t offset, int origin)
 
 EXPORT_SYMBOL (seq_lseek)
 
int seq_release (struct inode *inode, struct file *file)
 
 EXPORT_SYMBOL (seq_release)
 
int seq_escape (struct seq_file *m, const char *s, const char *esc)
 
 EXPORT_SYMBOL (seq_escape)
 
int seq_vprintf (struct seq_file *m, const char *f, va_list args)
 
 EXPORT_SYMBOL (seq_vprintf)
 
int seq_printf (struct seq_file *m, const char *f,...)
 
 EXPORT_SYMBOL (seq_printf)
 
charmangle_path (char *s, const char *p, const char *esc)
 
 EXPORT_SYMBOL (mangle_path)
 
int seq_path (struct seq_file *m, const struct path *path, const char *esc)
 
 EXPORT_SYMBOL (seq_path)
 
int seq_path_root (struct seq_file *m, const struct path *path, const struct path *root, const char *esc)
 
int seq_dentry (struct seq_file *m, struct dentry *dentry, const char *esc)
 
int seq_bitmap (struct seq_file *m, const unsigned long *bits, unsigned int nr_bits)
 
 EXPORT_SYMBOL (seq_bitmap)
 
int seq_bitmap_list (struct seq_file *m, const unsigned long *bits, unsigned int nr_bits)
 
 EXPORT_SYMBOL (seq_bitmap_list)
 
int single_open (struct file *file, int(*show)(struct seq_file *, void *), void *data)
 
 EXPORT_SYMBOL (single_open)
 
int single_release (struct inode *inode, struct file *file)
 
 EXPORT_SYMBOL (single_release)
 
int seq_release_private (struct inode *inode, struct file *file)
 
 EXPORT_SYMBOL (seq_release_private)
 
void__seq_open_private (struct file *f, const struct seq_operations *ops, int psize)
 
 EXPORT_SYMBOL (__seq_open_private)
 
int seq_open_private (struct file *filp, const struct seq_operations *ops, int psize)
 
 EXPORT_SYMBOL (seq_open_private)
 
int seq_putc (struct seq_file *m, char c)
 
 EXPORT_SYMBOL (seq_putc)
 
int seq_puts (struct seq_file *m, const char *s)
 
 EXPORT_SYMBOL (seq_puts)
 
int seq_put_decimal_ull (struct seq_file *m, char delimiter, unsigned long long num)
 
 EXPORT_SYMBOL (seq_put_decimal_ull)
 
int seq_put_decimal_ll (struct seq_file *m, char delimiter, long long num)
 
 EXPORT_SYMBOL (seq_put_decimal_ll)
 
int seq_write (struct seq_file *seq, const void *data, size_t len)
 
 EXPORT_SYMBOL (seq_write)
 
struct list_headseq_list_start (struct list_head *head, loff_t pos)
 
 EXPORT_SYMBOL (seq_list_start)
 
struct list_headseq_list_start_head (struct list_head *head, loff_t pos)
 
 EXPORT_SYMBOL (seq_list_start_head)
 
struct list_headseq_list_next (void *v, struct list_head *head, loff_t *ppos)
 
 EXPORT_SYMBOL (seq_list_next)
 
struct hlist_nodeseq_hlist_start (struct hlist_head *head, loff_t pos)
 
 EXPORT_SYMBOL (seq_hlist_start)
 
struct hlist_nodeseq_hlist_start_head (struct hlist_head *head, loff_t pos)
 
 EXPORT_SYMBOL (seq_hlist_start_head)
 
struct hlist_nodeseq_hlist_next (void *v, struct hlist_head *head, loff_t *ppos)
 
 EXPORT_SYMBOL (seq_hlist_next)
 
struct hlist_nodeseq_hlist_start_rcu (struct hlist_head *head, loff_t pos)
 
 EXPORT_SYMBOL (seq_hlist_start_rcu)
 
struct hlist_nodeseq_hlist_start_head_rcu (struct hlist_head *head, loff_t pos)
 
 EXPORT_SYMBOL (seq_hlist_start_head_rcu)
 
struct hlist_nodeseq_hlist_next_rcu (void *v, struct hlist_head *head, loff_t *ppos)
 
 EXPORT_SYMBOL (seq_hlist_next_rcu)
 

Function Documentation

void* __seq_open_private ( struct file f,
const struct seq_operations ops,
int  psize 
)

Definition at line 621 of file seq_file.c.

EXPORT_SYMBOL ( seq_open  )
EXPORT_SYMBOL ( seq_read  )
EXPORT_SYMBOL ( seq_lseek  )
EXPORT_SYMBOL ( seq_release  )
EXPORT_SYMBOL ( seq_escape  )
EXPORT_SYMBOL ( seq_vprintf  )
EXPORT_SYMBOL ( seq_printf  )
EXPORT_SYMBOL ( mangle_path  )
EXPORT_SYMBOL ( seq_path  )
EXPORT_SYMBOL ( seq_bitmap  )
EXPORT_SYMBOL ( seq_bitmap_list  )
EXPORT_SYMBOL ( single_open  )
EXPORT_SYMBOL ( single_release  )
EXPORT_SYMBOL ( seq_release_private  )
EXPORT_SYMBOL ( __seq_open_private  )
EXPORT_SYMBOL ( seq_open_private  )
EXPORT_SYMBOL ( seq_putc  )
EXPORT_SYMBOL ( seq_puts  )
EXPORT_SYMBOL ( seq_put_decimal_ull  )
EXPORT_SYMBOL ( seq_put_decimal_ll  )
EXPORT_SYMBOL ( seq_write  )
EXPORT_SYMBOL ( seq_list_start  )
EXPORT_SYMBOL ( seq_list_start_head  )
EXPORT_SYMBOL ( seq_list_next  )
EXPORT_SYMBOL ( seq_hlist_start  )
EXPORT_SYMBOL ( seq_hlist_start_head  )
EXPORT_SYMBOL ( seq_hlist_next  )
EXPORT_SYMBOL ( seq_hlist_start_rcu  )
EXPORT_SYMBOL ( seq_hlist_start_head_rcu  )
EXPORT_SYMBOL ( seq_hlist_next_rcu  )
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 m,
struct dentry dentry,
const char esc 
)

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 file,
loff_t  offset,
int  origin 
)

Definition at line 303 of file seq_file.c.

int seq_open ( struct file file,
const struct seq_operations op 
)

Definition at line 47 of file seq_file.c.

int seq_open_private ( struct file filp,
const struct seq_operations ops,
int  psize 
)

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_printf ( struct seq_file m,
const char f,
  ... 
)

Definition at line 408 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 file,
char __user buf,
size_t  size,
loff_t *  ppos 
)

Definition at line 152 of file seq_file.c.

int seq_release ( struct inode inode,
struct file file 
)

Definition at line 347 of file seq_file.c.

int seq_release_private ( struct inode inode,
struct file file 
)

Definition at line 611 of file seq_file.c.

int seq_vprintf ( struct seq_file m,
const char f,
va_list  args 
)

Definition at line 392 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 file,
int(*)(struct seq_file *, void *)  show,
void data 
)

Definition at line 581 of file seq_file.c.

int single_release ( struct inode inode,
struct file file 
)

Definition at line 602 of file seq_file.c.