Files
oldlinux-files/bin-src/devices-entry-for-linux
2024-02-19 00:21:55 -05:00

44 lines
1.8 KiB
Plaintext

From: zuazaga@ucunix.san.uc.edu (Humberto Ortiz-Zuazaga)
Newsgroups: alt.os.linux
Subject: Re: linux-dos-linux file access
Summary: Mtools pl5 changes
Keywords: Mtools, changes
Date: 23 Jan 92 16:21:23 GMT
Organization: Univ. of Cincinnati
In article <1992Jan22.135130.26695@athena.mit.edu> mont@netcom.netcom.com (Mont Pierce) writes:
>I've tried compiling mtools, but it wants a device[s] to be defined in
>devices.c. Can anyone send me a sample of drives defined in this module?
>
I grabbed a copy of Mtools patchlevel 5 off of comp.sources.xxx
recently, and the only change I had to make was to define the
appropriate devices for Linux. Note that the patches I found on tsx-11
were not quite correct, the B: drive didn't work. The devices I'm using
now are:
#ifdef __linux__
struct device devices[] = {
{'A', "/dev/dosA" , 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
{'A', "/dev/at0" , 0L, 12, 0, (int (*) ()) 0, 80, 2, 15},
{'B', "/dev/dosB" , 0L, 12, 0, (int (*) ()) 0, 80, 2, 9},
{'B', "/dev/PS1" , 0L, 12, 0, (int (*) ()) 0, 80, 2, 18},
{'C', "/dev/dosC" , 0L, 16, 0, (int (*) ()) 0, 0, 0, 0},
{'\0', (char *) NULL, 0L, 0, 0, (int (*) ()) 0, 0, 0, 0}
};
#endif /* __LINUX__ */
But for this to work, the named devices have to be already made in /dev.
Example, in my case /dev/dosA is a low density drive, (9 sectors, 80
tracks), so it must be made with the appropriate major and minor device
numbers for a low density drive. The devices Linux comes with are
probably not the same you have, so double check them. (Linux has a 1.44
in A:, a 1.2 in B:, and C is the 6th HD partition.)
Good luck!
--
Humberto Ortiz-Zuazaga INTERNET: zuazaga@ucunix.san.uc.edu
Dept. of Physiology & Biophysics BITNET: picone@ucbeh
University of Cincinnati CIS: 72301,2303