]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | // SPDX-License-Identifier: GPL-2.0 |
b9103da4 | 2 | #include <linux/kernel.h> |
38789fda | 3 | #include <linux/export.h> |
b9103da4 | 4 | #include <linux/ide.h> |
6d703a81 | 5 | #include <linux/seq_file.h> |
b9103da4 BZ |
6 | |
7 | #include "ide-floppy.h" | |
8 | ||
6d703a81 | 9 | static int idefloppy_capacity_proc_show(struct seq_file *m, void *v) |
b9103da4 | 10 | { |
6d703a81 | 11 | ide_drive_t*drive = (ide_drive_t *)m->private; |
b9103da4 | 12 | |
6d703a81 AD |
13 | seq_printf(m, "%llu\n", (long long)ide_gd_capacity(drive)); |
14 | return 0; | |
b9103da4 BZ |
15 | } |
16 | ||
17 | ide_proc_entry_t ide_floppy_proc[] = { | |
ec7d9c9c CH |
18 | { "capacity", S_IFREG|S_IRUGO, idefloppy_capacity_proc_show }, |
19 | { "geometry", S_IFREG|S_IRUGO, ide_geometry_proc_show }, | |
6d703a81 | 20 | {} |
b9103da4 BZ |
21 | }; |
22 | ||
23 | ide_devset_rw_field(bios_cyl, bios_cyl); | |
24 | ide_devset_rw_field(bios_head, bios_head); | |
25 | ide_devset_rw_field(bios_sect, bios_sect); | |
26 | ide_devset_rw_field(ticks, pc_delay); | |
27 | ||
28 | const struct ide_proc_devset ide_floppy_settings[] = { | |
29 | IDE_PROC_DEVSET(bios_cyl, 0, 1023), | |
30 | IDE_PROC_DEVSET(bios_head, 0, 255), | |
31 | IDE_PROC_DEVSET(bios_sect, 0, 63), | |
32 | IDE_PROC_DEVSET(ticks, 0, 255), | |
71bfc7a7 | 33 | { NULL }, |
b9103da4 | 34 | }; |