This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Renaiming disk devices....


Jonathan Larmour wrote:
Andrew Lunn wrote:
Hi Folks

A while back Frank Pagliughi provided a patch for the IDE driver which
amongst other things renamed the disk drives. The change would be

/dev/hda -> /dev/disk0
/dev/hdb -> /dev/disk1
etc

This makes the IDE driver consistent with the FATFS packages which
also uses the same naming convention. The "Elatec v850 development
board disk driver" also uses this naming scheme. However the MMC disk,
synthetic disk and fileio package documentation use the /dev/hd
scheme.

Overall we are not consistent. We could:

1) leave it all as it is.
2) make it consistent, changing to:
a) /dev/hd?
or
b) /dev/disk?

Changing will probably lead to some short term breakage as with any
renaming of objects, but in the long term consistency is always good.

I would suggest making the change to /dev/disk everywhere, but what do
others think?

I think the best situation is to have each name for each device driver class be unique, otherwise by default they can't co-exist.

So maybe you could say /dev/hda should be /dev/idedisk0 or something like
that (just /dev/ide0 could refer to a bus instance, rather than disk).
Although I think possibly these days it's well enough accepted that
/dev/hda refers to an IDE disk (like /dev/sda refers to a SCSI disk) that
it could probably be left as-is.

The other disks should probably be renamed to something unique though IMHO,
e.g. /dev/synthdisk0, /dev/mmcspi0

Jifl
I can see that. My assumption was that individual embedded systems wouldn't have a lot of different types of disk drives, so a simplified naming scheme would be easier to understand. But, then again, nothing would surprise me, so I could easily be convinced either way.

It's just unfortunate that a configuration with a single filesystem and single drive type don't agree on the drive name. Is this something the CDL could detect and resolve?

My thoughts came about because, even though I have a reasonable amount of experience with eCos, the first time I tried to experiment with using a hard drive and FAT file system, I was much delayed in a debug session, only to discover the sole problem was due to the naming scheme:
1. The only test program, fatfs1, is hard-coded for drives named "/dev/diskx/"
2. The drive name must end with a "/" in order for the lookup to discover partitions.


Maybe we just need it documented better.

Frank

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]