- dsk_err_t e = dsk_open(&this->dev, filename, deviceOpts, NULL);
+ char *format;
+ char driverName[80];
+ const char *boo;
+ dsk_err_t e;
+
+ /* Assume driver name & format name both fit in 80 characters, rather than
+ * malloccing the exact size */
+ if (deviceOpts == NULL)
+ {
+ e = dsk_open(&this->dev, filename, NULL, NULL);
+ format = NULL;
+ }
+ else
+ {
+ strncpy(driverName, deviceOpts, 79);
+ driverName[79] = 0;
+ format = strchr(driverName, ',');
+ if (format)
+ {
+ *format = 0;
+ ++format;
+ }
+ e = dsk_open(&this->dev, filename, driverName, NULL);
+ }