Check-in [b148c9848f]
Overview
Comment:Added start of "modprobe"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b148c9848f65b6b3147e87347e43abd0b17bb46e
User & Date: rkeene on 2014-10-29 15:43:09
Other Links: manifest | tags
Context
2014-10-29
15:48
Updated to source correct file even if "." is not in the path check-in: a741d40026 user: rkeene tags: trunk
15:43
Added start of "modprobe" check-in: b148c9848f user: rkeene tags: trunk
15:42
Post-release version increment check-in: 0111ae8fbf user: rkeene tags: trunk
Changes

Modified test.tcl from [550d4882f7] to [0a5644d7e0].

1
2
3
4
5


6
7
8
9
10
11
12
#! /usr/bin/env tclsh

puts [exec ./build-dyn.sh]

load ./tuapi.so



::tuapi::syscall::tsmf_start_svc blah /bin/true /tmp/logfile [list PATH=/bin] / 022 0 0 10

foreach iface [tuapi::syscall::ifconfig] {
#lo0:2: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
#        inet 127.0.0.1 netmask ff000000 
#aggr100003:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2





>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /usr/bin/env tclsh

puts [exec ./build-dyn.sh]

load ./tuapi.so

::tuapi::modprobe fuse

::tuapi::syscall::tsmf_start_svc blah /bin/true /tmp/logfile [list PATH=/bin] / 022 0 0 10

foreach iface [tuapi::syscall::ifconfig] {
#lo0:2: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
#        inet 127.0.0.1 netmask ff000000 
#aggr100003:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2

Modified tuapi.tcl from [dc4245bc68] to [fd3cc0d95d].

250
251
252
253
254
255
256




















































				::tuapi::syscall::ifconfig $interface flags $flags
			}

		}
	}
}


























































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307

				::tuapi::syscall::ifconfig $interface flags $flags
			}

		}
	}
}

proc ::tuapi::internal::foreach_line {fd {sep ""} code} {
	while {![eof $fd]} {
		gets $fd line

		regsub { *#.*$} $line {} line

		if {$line == ""} {
			continue
		}

		if {$sep == ""} {
			set line [split $line]
		} else {
			set line [split $line $sep]
		}

		uplevel 1 [list set line $line]
		uplevel 1 $code
	}
	uplevel 1 [list unset -nocomplain line]
}

proc ::tuapi::modprobe args {
	# Load aliases
	set modules_dir [file join /lib/modules $::tcl_platform(osVersion)]
	set aliases_file [file join $modules_dir modules.alias]
	set fd [open $aliases_file]
	::tuapi::internal::foreach_line $fd {
		set alias [lindex $line 1]
		set module [lindex $line 2]

		set alias2module($alias) $module
	}

	close $fd

	# Load dependencies
	set deps_file [file join $modules_dir modules.dep]
	::tuapi::internal::foreach_line $fd ":" {
		set module [string trim [lindex $line 0]]
		set deps [split [string trim [lrange $line 1 end]]]
		puts "$module -> $deps"
	}

	# Load modules
	foreach modules $args {
		foreach module $modules {
		}
	}
}