patch-2.1.75 linux/drivers/block/ide-disk.c
Next file: linux/drivers/block/ide-floppy.c
Previous file: linux/drivers/block/floppy.c
Back to the patch index
Back to the overall index
- Lines: 23
- Date:
Sun Dec 21 17:14:45 1997
- Orig file:
v2.1.74/linux/drivers/block/ide-disk.c
- Orig date:
Fri Dec 19 15:52:56 1997
diff -u --recursive --new-file v2.1.74/linux/drivers/block/ide-disk.c linux/drivers/block/ide-disk.c
@@ -467,7 +467,22 @@
drive->special.b.set_multmode = 1;
}
+static int proc_idedisk_read_cache
+ (char *page, char **start, off_t off, int count, int *eof, void *data)
+{
+ ide_drive_t *drive = (ide_drive_t *) data;
+ char *out = page;
+ int len;
+
+ if (drive->id)
+ len = sprintf(out,"%i\n", drive->id->buf_size / 2);
+ else
+ len = sprintf(out,"(none)\n");
+ PROC_IDE_READ_RETURN(page,start,off,count,eof,len);
+}
+
static ide_proc_entry_t idedisk_proc[] = {
+ { "cache", proc_idedisk_read_cache, NULL },
{ "geometry", proc_ide_read_geometry, NULL },
{ NULL, NULL, NULL }
};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov