added freesize to mount
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@1804
This commit is contained in:
parent
ca50c591ce
commit
4fc5d29b5e
2 changed files with 19 additions and 4 deletions
12
README
12
README
|
@ -73,7 +73,7 @@ In addition, the following commands are available:
|
|||
|
||||
MOUNT "Emulated Drive letter" "Real Drive or Directory"
|
||||
[-t type] [-aspi] [-ioctl] [-usecd number] [-size drivesize]
|
||||
[-label drivelabel]
|
||||
[-label drivelabel] [-freesize sizemb]
|
||||
MOUNT -cd
|
||||
|
||||
Program to mount local directories as drives inside DOSBox.
|
||||
|
@ -93,6 +93,10 @@ MOUNT -cd
|
|||
-size drivesize
|
||||
Sets the size of the drive.
|
||||
|
||||
-freesize sizemb
|
||||
Sets the amount of freespace avaiable on a drive in MB's. This
|
||||
is a more simple version of -size.
|
||||
|
||||
-label drivelabel
|
||||
Sets the name of the drive to "drivelabel". Needed on some
|
||||
systems if the cd label isn't read correctly. Useful when a
|
||||
|
@ -136,9 +140,11 @@ MOUNT -cd
|
|||
3. To mount system cdrom drive at mountpoint /media/cdrom as cdrom drive D
|
||||
in dosbox:
|
||||
mount d /media/cdrom -t cdrom -usecd 0
|
||||
4. To mount a drive with 870 mb free diskspace (rarely needed! experts only):
|
||||
4. To mount a drive with 870 mb free diskspace (simple version):
|
||||
mount c d:\ -freesize 870
|
||||
5. To mount a drive with 870 mb free diskspace (experts only, full control):
|
||||
mount c d:\ -size 4025,127,16513,1700
|
||||
5. To mount /home/dos/dosgames as drive C in DOSBox:
|
||||
6. To mount /home/dos/dosgames as drive C in DOSBox:
|
||||
mount c /home/dos/dosgames
|
||||
|
||||
MEM
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/* $Id: dos_programs.cpp,v 1.24 2004-05-04 18:34:08 qbix79 Exp $ */
|
||||
/* $Id: dos_programs.cpp,v 1.25 2004-05-20 11:11:45 qbix79 Exp $ */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -84,6 +84,15 @@ public:
|
|||
WriteOut(MSG_Get("PROGAM_MOUNT_ILL_TYPE"),type.c_str());
|
||||
return;
|
||||
}
|
||||
/* Parse the free space in mb's */
|
||||
std::string mb_size;
|
||||
if(cmd->FindString("-freesize",mb_size,true)) {
|
||||
char teststr[1024];
|
||||
Bit16u sizemb = static_cast<Bit16u>(atoi(mb_size.c_str()));
|
||||
sprintf(teststr,"512,127,16513,%d",sizemb*1024*1024/(512*127));
|
||||
str_size=teststr;
|
||||
}
|
||||
|
||||
cmd->FindString("-size",str_size,true);
|
||||
char number[20];const char * scan=str_size.c_str();
|
||||
Bitu index=0;Bitu count=0;
|
||||
|
|
Loading…
Add table
Reference in a new issue