Skip to contentSkip to conversation

mark swim3 floppy controller as removable device

PATCH New Olaf Hering 1 participant 1 message Jul 28, 2004 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mark swim3 floppy controller as removable device

Mark the mac floppy controller driver as removable media. This prevents an entry in /proc/partitions. Several tools will not try to access the floppy anymore with this change.

drivers/block/swim3.c +1 -0
diff -purN linux-2.6.8-rc2-bk6.orig/drivers/block/swim3.c linux-2.6.8-rc2-bk6/drivers/block/swim3.c
@@ -1058,6 +1058,7 @@ int swim3_init(void)
 		disk->fops = &floppy_fops;
 		disk->private_data = &floppy_states[i];
 		disk->queue = swim3_queue;
+		disk->flags |= GENHD_FL_REMOVABLE;
 		sprintf(disk->disk_name, "fd%d", i);
 		sprintf(disk->devfs_name, "floppy/%d", i);
 		set_capacity(disk, 2880);
Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG