Bug 94147 - Cannot change device name; doesn't work on devfs
Summary: Cannot change device name; doesn't work on devfs
Status: RESOLVED FIXED
Alias: None
Product: kfloppy
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Bernd Wuebben
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 03:02 UTC by Thiago Macieira
Modified: 2004-12-19 09:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thiago Macieira 2004-11-30 03:02:28 UTC
Version:           3.3.89 (CVS >= 20041104) (using KDE 3.3.89 (CVS >= 20041104), compiled sources)
Compiler:          gcc version 3.4.2
OS:                Linux (i686) release 2.6.9

When using non-standard device names, kfloppy will simply not work.

This may happen if:
1) the devices are named "universal" instead of high-density, for 3.5" drives. Instead of /dev/fd0h1440, you have /dev/fd0u1440.

2) devfs. The device is named /dev/floppy/0u1440.
Comment 1 Nicolas Goutte 2004-12-15 20:14:10 UTC
Point 1 should work, as /dev/fd0u1440 is a fallback.

As for point 2, what are the other formats named /dev/floppy/0u720 for example?

(Note: bug #94392 is supposed to change exactly the same code.)

Have a nice day!
Comment 2 Nicolas Goutte 2004-12-15 21:53:27 UTC
CVS commit by goutte: 

- fix errounous device names for floppy 1 (It accessed floppy 0 instead).
  (This is perhaps what was meant by point 1 of bug #94147)
- add some alternate floppy device names
CCBUG:94147


  M +5 -5      format.cpp   1.19


--- kdeutils/kfloppy/format.cpp  #1.18:1.19
@@ -167,11 +167,11 @@ void KFActionQueue::queue(KFAction *p)
 #ifdef ANY_LINUX
 const char *fd0H1440[] = { "/dev/fd0h1440", "/dev/fd0H1440", "/dev/fd0u1440", 0L } ;
-const char *fd0D720[]={ "/dev/fd0u720", "/dev/fd0D720", 0L };
+const char *fd0D720[] = { "/dev/fd0u720", "/dev/fd0D720", "/dev/fd0h720", 0L };
 const char *fd0h1200[]={ "/dev/fd0h1200", 0L };
-const char *fd0h360[]={ "/dev/fd0h360", 0L };
-const char *fd1H1440[] = { "/dev/fd1h1440", "/dev/fd1H1440", "/dev/fd0u1440", 0L } ;
-const char *fd1D720[]={ "/dev/fd0u720", "/dev/fd1D720", 0L };
+const char *fd0h360[] = { "/dev/fd0h360", "/dev/fd0h360", "/dev/fd0d360", 0L };
+const char *fd1H1440[] = { "/dev/fd1h1440", "/dev/fd1H1440", "/dev/fd1u1440", 0L } ;
+const char *fd1D720[] = { "/dev/fd1u720", "/dev/fd1D720", "/dev/fd1h720", 0L };
 const char *fd1h1200[]={ "/dev/fd1h1200", 0L };
-const char *fd1h360[]={ "/dev/fd1h360", 0L };
+const char *fd1h360[] = { "/dev/fd1u360", "/dev/fd1h360", "/dev/fd1d360", 0L };
 const char *fd0auto[] = { "/dev/fd0", 0L };
 const char *fd1auto[] = { "/dev/fd1", 0L };


Comment 3 Nicolas Goutte 2004-12-15 22:05:35 UTC
CVS commit by goutte: 

- add device names for devfs (Linux only... of course)
  Devfs users: please verify the names and what is the name for the 1200 format
- fix a few typos in the device names
CCBUG:94147


  M +14 -6     format.cpp   1.20


--- kdeutils/kfloppy/format.cpp  #1.19:1.20
@@ -166,12 +166,18 @@ void KFActionQueue::queue(KFAction *p)
 //
 #ifdef ANY_LINUX
-const char *fd0H1440[] = { "/dev/fd0h1440", "/dev/fd0H1440", "/dev/fd0u1440", 0L } ;
-const char *fd0D720[] = { "/dev/fd0u720", "/dev/fd0D720", "/dev/fd0h720", 0L };
+
+// ### TODO: verify that all /dev/floppy really exist in devfs
+// ### TODO: verify 1200 format (does /dev/fd?u1200 exist, devfs name?)
+
+const char *fd0H1440[] = { "/dev/fd0u1440", "/dev/floppy/0u1440", "/dev/fd0h1440", "/dev/fd0H1440", 0L } ;
+const char *fd0D720[] = { "/dev/fd0u720", "/dev/floppy/0u720", "/dev/fd0D720", "/dev/fd0h720", 0L };
 const char *fd0h1200[]={ "/dev/fd0h1200", 0L };
-const char *fd0h360[] = { "/dev/fd0h360", "/dev/fd0h360", "/dev/fd0d360", 0L };
-const char *fd1H1440[] = { "/dev/fd1h1440", "/dev/fd1H1440", "/dev/fd1u1440", 0L } ;
-const char *fd1D720[] = { "/dev/fd1u720", "/dev/fd1D720", "/dev/fd1h720", 0L };
+const char *fd0h360[] = { "/dev/fd0u360", "/dev/floppy/0u360", "/dev/fd0h360", "/dev/fd0d360", 0L };
+
+const char *fd1H1440[] = { "/dev/fd1u1440", "/dev/floppy/1u1440","/dev/fd1h1440", "/dev/fd1H1440", 0L } ;
+const char *fd1D720[] = { "/dev/fd1u720", "/dev/floppy/1u720", "/dev/fd1D720", "/dev/fd1h720", 0L };
 const char *fd1h1200[]={ "/dev/fd1h1200", 0L };
-const char *fd1h360[] = { "/dev/fd1u360", "/dev/fd1h360", "/dev/fd1d360", 0L };
+const char *fd1h360[] = { "/dev/fd1u360", "/dev/floppy/1u360","/dev/fd1h360", "/dev/fd1d360", 0L };
+
 const char *fd0auto[] = { "/dev/fd0", 0L };
 const char *fd1auto[] = { "/dev/fd1", 0L };


Comment 4 Thiago Macieira 2004-12-15 23:20:36 UTC
My last 5 ΒΌ" drive is 3 computers back, so I don't know anymore how they're named.

I do believe they have the naming is:
  s,/dev/fd,/dev/floppy/,

So, /dev/fd0h1200 should be /dev/floppy/1h1200. Not sure, though.
Comment 5 Nicolas Goutte 2004-12-19 09:47:48 UTC
CVS commit by goutte: 

Add 1.2MB device in the case of devfs
(For what I understand of the Linux floppy driver, there is only h1200, not
any u1200.)
BUG:94147


  M +2 -5      format.cpp   1.21


--- kdeutils/kfloppy/format.cpp  #1.20:1.21
@@ -167,15 +167,12 @@ void KFActionQueue::queue(KFAction *p)
 #ifdef ANY_LINUX
 
-// ### TODO: verify that all /dev/floppy really exist in devfs
-// ### TODO: verify 1200 format (does /dev/fd?u1200 exist, devfs name?)
-
 const char *fd0H1440[] = { "/dev/fd0u1440", "/dev/floppy/0u1440", "/dev/fd0h1440", "/dev/fd0H1440", 0L } ;
 const char *fd0D720[] = { "/dev/fd0u720", "/dev/floppy/0u720", "/dev/fd0D720", "/dev/fd0h720", 0L };
-const char *fd0h1200[]={ "/dev/fd0h1200", 0L };
+const char *fd0h1200[] = { "/dev/fd0h1200", "/dev/floppy/0h1200", 0L };
 const char *fd0h360[] = { "/dev/fd0u360", "/dev/floppy/0u360", "/dev/fd0h360", "/dev/fd0d360", 0L };
 
 const char *fd1H1440[] = { "/dev/fd1u1440", "/dev/floppy/1u1440","/dev/fd1h1440", "/dev/fd1H1440", 0L } ;
 const char *fd1D720[] = { "/dev/fd1u720", "/dev/floppy/1u720", "/dev/fd1D720", "/dev/fd1h720", 0L };
-const char *fd1h1200[]={ "/dev/fd1h1200", 0L };
+const char *fd1h1200[] = { "/dev/fd1h1200", "/dev/floppy/1h1200", 0L };
 const char *fd1h360[] = { "/dev/fd1u360", "/dev/floppy/1u360","/dev/fd1h360", "/dev/fd1d360", 0L };