ports/emulators/dynagen-devel/files/patch-dynamips_lib.py
Edwin Groothuis 1e2b51f634 [NEW PORT] emulators/dynagen-devel: Text-based front end for Dynamips development version
Dynagen is a front-end for use with the Dynamips Cisco router
	emulator. It uses an INI-like configuration file to provision
	Dynamips emulator networks. It takes care of specifying the right
	port adapters, generating and matching up those pesky NIO descriptors,
	specifying bridges, frame-relay, ATM switches, etc. It also provides
	a management CLI for listing devices, suspending and reloading
	instances, etc.

	WWW: http://dyna-gen.sourceforge.net/

PR:		ports/116343
Submitted by:	Pavel I Volkov <pol@opk.ru>
2007-09-23 04:22:40 +00:00

15 lines
512 B
Python

--- dynamips_lib.py.orig Thu Sep 13 20:41:38 2007
+++ dynamips_lib.py Thu Sep 13 20:43:22 2007
@@ -1681,7 +1681,11 @@
flag = '1'
else:
flag = '0'
- send(self.__d, 'vm set_sparse_mem %s %s' % (self.__name, flag))
+
+ # Workaround for "*** Error: Unknown command 'set_sparse_mem'" message
+ # with dynamips-0.2.5.
+ if flag == 1:
+ send(self.__d, 'vm set_sparse_mem %s %s' % (self.__name, flag))
def __getsparsemem(self):
""" Returns the sparsemem