Version: 3.3.1 (using KDE 3.3.1, (3.1)) Compiler: gcc version 3.3.5 (Debian 1:3.3.5-2) OS: Linux (i686) release 2.6.9-1-686 On udev, there often is no "/dev/fd0h1440" (this is just an example, other device-nodes used by kfloppy often don't exist as well). Mandrake already patched its version of kfloppy (http://www.mandrakesoft.com/security/advisories?name=MDKA-2004:047), but IMHO the patch should also be included "upstream", since more and more installations use udev. I re-created the diff-file (against 3.3.1) and attached it.
Created attachment 8533 [details] KFloppy devicename-table patch
(Note: bug #94147 is supposed to change exactly the same code.)
Even after thinking a little, I do not like the patch too much. The main problem is that we let the user select the format but then (with the patch) we would drop that information and let fdformat and Linux choose. So perhaps we need an entry that the user can choose for having directly /dev/fd0 and /dev/fd1. That would be propably easy to add and would not create fallbacks that invalidate the user's choice. As for udev, itself, I do not know much about it. Does it really does not have any way to select a particular format? (even devfs as a way, see bug #94147) Have a nice day!
CVS commit by goutte: Allow the user to be able to select an "Auto-Detect" mode, to let fdformat choose in what file format the floppy disk should be formatted (only Linux). This is also a work-around for bug #94392 CCBUG:94392 M +6 -1 floppy.cpp 1.81 M +4 -0 format.cpp 1.18 --- kdeutils/kfloppy/floppy.cpp #1.80:1.81 @@ -84,4 +84,5 @@ FloppyData::FloppyData(QWidget * parent, g1->addWidget( densityComboBox, 1, 1, AlignLeft ); + densityComboBox->insertItem( i18n( "Auto-Detect" ) ); densityComboBox->insertItem(i18n("3.5\" 1.44MB")); densityComboBox->insertItem(i18n("3.5\" 720KB")); @@ -323,5 +324,9 @@ bool FloppyData::findDevice() blocks = 360; } - +#if defined(ANY_LINUX) + else { // For Linux, anything else is Auto + blocks = 0; + } +#endif return true; --- kdeutils/kfloppy/format.cpp #1.17:1.18 @@ -174,4 +174,6 @@ const char *fd1D720[]={ "/dev/fd0u720", const char *fd1h1200[]={ "/dev/fd1h1200", 0L }; const char *fd1h360[]={ "/dev/fd1h360", 0L }; +const char *fd0auto[] = { "/dev/fd0", 0L }; +const char *fd1auto[] = { "/dev/fd1", 0L }; #endif @@ -206,4 +208,6 @@ fdinfo fdtable[] = { fd0h360, 0, 360, 40, 0 }, { fd1h360, 1, 360, 40, 0 }, + { fd0auto, 0, 0, 80, 0 }, + { fd1auto, 1, 0, 80, 0 }, #endif
With kde 3.4.2 on Debian unstable, I receive the error 'Unexpected density number 0' with Udev and selecting the 'Auto-Detect' option. Using a "forward ported" patch like the Mandrake included one, I can format fine.
According to http://forums.gentoo.org/viewtopic-t-413039.html this is still an issue with KDE 3.5.5 and if I read the the fdformat man page right, KFloppy should use setfdprm, instead relying on the legacy symlinks.
*** Bug 144568 has been marked as a duplicate of this bug. ***
*** Bug 146046 has been marked as a duplicate of this bug. ***
SVN commit 670410 by lunakl: Check all available densities instead of a hardcoded list. This fixes autodetect. CCBUG: 94392 M +9 -3 format.cpp --- trunk/KDE/kdeutils/kfloppy/format.cpp #670409:670410 @@ -270,14 +270,20 @@ emit status(i18n("Unexpected drive number %1.", drive),-1); return false; } - if (!( /* (2880==de) || */ (1440==density) || (720==density) || - (1200==density) || (360==density))) + + fdinfo *deviceinfo = fdtable; + for ( ; deviceinfo && (deviceinfo->devices) ; deviceinfo++) { + if (deviceinfo->blocks != density) + continue; + } + if (!deviceinfo) + { emit status(i18n("Unexpected density number %1.", density),-1); return false; } - fdinfo *deviceinfo = fdtable; + deviceinfo = fdtable; for ( ; deviceinfo && (deviceinfo->devices) ; deviceinfo++) { if (deviceinfo->blocks != density)
SVN commit 670413 by lunakl: Default to density autodetect. CCBUG: 94392 M +4 -0 floppy.cpp --- branches/KDE/3.5/kdeutils/kfloppy/floppy.cpp #670412:670413 @@ -702,7 +702,11 @@ labelnameconfig = config->readEntry( "Label", i18n("Volume label, maximal 11 characters", "KDE Floppy") ); quickformatconfig = config->readNumEntry("QuickFormat",0); driveconfig = config->readEntry( "FloppyDrive", i18n("Primary") ); +#if defined(ANY_LINUX) + densityconfig = config->readEntry( "Density", i18n( "Auto-Detect" ) ); +#else densityconfig = config->readEntry( "Density", i18n("3.5\" 1.44MB") ); +#endif filesystemconfig = config->readEntry( "Filesystem", i18n("DOS") ); }
Autodetect now should work and is the default. Leaving still open because of comment #6.
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? Thank you for helping us make KDE software even better for everyone!
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!