linux-4.4.1/single_open()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#wf046f7a]
#backlinks
*説明 [#m8fdf95b]
-パス: [[linux-4.4.1/fs/seq_file.c]]
-FIXME: これは何?
--説明
**引数 [#c42dcf33]
-struct file *file
--
--[[linux-4.4.1/file]]
-int (*show)(struct seq_file *, void *)
--
--[[linux-4.4.1/seq_file]]
-void *data
--
**返り値 [#w0730b9f]
-int
--
**参考 [#z660567c]
*実装 [#w384d0f8]
int single_open(struct file *file, int (*show)(struct se...
void *data)
{
struct seq_operations *op = kmalloc(sizeof(*op),...
int res = -ENOMEM;
-
--[[linux-4.4.1/seq_operations]]
--[[linux-4.4.1/kmalloc()]]
if (op) {
op->start = single_start;
op->next = single_next;
op->stop = single_stop;
op->show = show;
res = seq_open(file, op);
if (!res)
((struct seq_file *)file->privat...
else
kfree(op);
-
--[[linux-4.4.1/single_start()]]
--[[linux-4.4.1/single_next()]]
--[[linux-4.4.1/single_stop()]]
--[[linux-4.4.1/seq_open()]]
--[[linux-4.4.1/seq_file]]
--[[linux-4.4.1/kfree()]]
}
return res;
}
EXPORT_SYMBOL(single_open);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]
*コメント [#t76eb22e]
終了行:
*参照元 [#wf046f7a]
#backlinks
*説明 [#m8fdf95b]
-パス: [[linux-4.4.1/fs/seq_file.c]]
-FIXME: これは何?
--説明
**引数 [#c42dcf33]
-struct file *file
--
--[[linux-4.4.1/file]]
-int (*show)(struct seq_file *, void *)
--
--[[linux-4.4.1/seq_file]]
-void *data
--
**返り値 [#w0730b9f]
-int
--
**参考 [#z660567c]
*実装 [#w384d0f8]
int single_open(struct file *file, int (*show)(struct se...
void *data)
{
struct seq_operations *op = kmalloc(sizeof(*op),...
int res = -ENOMEM;
-
--[[linux-4.4.1/seq_operations]]
--[[linux-4.4.1/kmalloc()]]
if (op) {
op->start = single_start;
op->next = single_next;
op->stop = single_stop;
op->show = show;
res = seq_open(file, op);
if (!res)
((struct seq_file *)file->privat...
else
kfree(op);
-
--[[linux-4.4.1/single_start()]]
--[[linux-4.4.1/single_next()]]
--[[linux-4.4.1/single_stop()]]
--[[linux-4.4.1/seq_open()]]
--[[linux-4.4.1/seq_file]]
--[[linux-4.4.1/kfree()]]
}
return res;
}
EXPORT_SYMBOL(single_open);
-
--[[linux-4.4.1/EXPORT_SYMBOL()]]
*コメント [#t76eb22e]
ページ名: