summaryrefslogtreecommitdiff
path: root/extras/floppy/create_floppy_devices.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-12-15 15:56:50 +0100
committerKay Sievers <kay.sievers@suse.de>2005-12-15 15:56:50 +0100
commit89a8f4e75e68aea378163a3c56b16f76cee407e0 (patch)
tree3c88c5c559e25343231b24809b34690deec132a4 /extras/floppy/create_floppy_devices.c
parentcbba4a544628b2f5d78cb15dadbc4e0f73f75eb3 (diff)
fix segfaulting create_floppy_devices
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'extras/floppy/create_floppy_devices.c')
-rw-r--r--extras/floppy/create_floppy_devices.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c
index b2906106d4..91d3a58195 100644
--- a/extras/floppy/create_floppy_devices.c
+++ b/extras/floppy/create_floppy_devices.c
@@ -31,9 +31,9 @@ static char *table[] = {
NULL
};
-static int t360[] = { 1 };
-static int t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23 };
-static int t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13, 17, 21, 22, 30 };
+static int t360[] = { 1, 0 };
+static int t1200[] = { 2, 5, 6, 10, 12, 14, 16, 18, 20, 23, 0 };
+static int t3in[] = { 8, 9, 26, 27, 28, 7, 11, 15, 19, 24, 25, 29, 31, 3, 4, 13, 17, 21, 22, 30, 0 };
static int *table_sup[] = { NULL, t360, t1200, t3in + 5 + 8, t3in + 5, t3in, t3in };
@@ -112,7 +112,7 @@ int main(int argc, char **argv)
i = 0;
while (table_sup[type][i]) {
- sprintf(node,"%s%s",dev,table[table_sup[type][i]]);
+ sprintf(node, "%s%s",dev, table[table_sup[type][i]]);
minor = (table_sup[type][i] << 2) + fdnum;
if (print_nodes)
printf("%s b %d %d %d\n", node, mode, major, minor);