return s_show_internal(m, p, 0);
}
+static int s_mod_show(struct seq_file *m, void *p)
+{
+ return s_show_internal(m, p, 1);
+}
+
static const struct seq_operations kallsyms_op = {
.start = s_start,
.next = s_next,
.show = s_show
};
-#ifdef CONFIG_KALLMODSYMS
-static int s_mod_show(struct seq_file *m, void *p)
-{
- return s_show_internal(m, p, 1);
-}
-
static const struct seq_operations kallmodsyms_op = {
.start = s_start,
.next = s_next,
.stop = s_stop,
.show = s_mod_show
};
-#endif
static int kallsyms_open_internal(struct inode *inode, struct file *file,
const struct seq_operations *ops)
return kallsyms_open_internal(inode, file, &kallsyms_op);
}
-#ifdef CONFIG_KALLMODSYMS
static int kallmodsyms_open(struct inode *inode, struct file *file)
{
return kallsyms_open_internal(inode, file, &kallmodsyms_op);
}
-#endif
#ifdef CONFIG_KGDB_KDB
const char *kdb_walk_kallsyms(loff_t *pos)
.release = seq_release_private,
};
-#ifdef CONFIG_KALLMODSYMS
static const struct file_operations kallmodsyms_operations = {
.open = kallmodsyms_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release_private,
};
-#endif
static int __init kallsyms_init(void)
{