ide-floppy_proc.c 916 B

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