[Drobo-utils-devel] SF.net SVN: drobo-utils:[200] trunk/drobom
Brought to you by:
peter_silva
|
From: <pet...@us...> - 2009-02-01 22:20:11
|
Revision: 200
http://drobo-utils.svn.sourceforge.net/drobo-utils/?rev=200&view=rev
Author: peter_silva
Date: 2009-02-01 22:20:07 +0000 (Sun, 01 Feb 2009)
Log Message:
-----------
change diag print to diagprint.
Modified Paths:
--------------
trunk/drobom
Modified: trunk/drobom
===================================================================
--- trunk/drobom 2009-02-01 22:14:54 UTC (rev 199)
+++ trunk/drobom 2009-02-01 22:20:07 UTC (rev 200)
@@ -25,8 +25,8 @@
print " -V, --version\treport version of drobo-utils."
print "\ncommand is one of: "
print "\tblink\tidentify the drobo by making the lights blink"
- print "\tdiag [ print ]\tdump diagnostics file into /tmp directory"
- print "\t\tprint - print to stdout as well"
+ print "\tdiag \tdump diagnostics file into /tmp directory"
+ print "\tdiagprint <file> - print diagnostic file to stdout"
print "\tformat\tPrepares a script to format LUNS from a device. Arguments:"
print "\t\t<fstype>\tfile system type. One of: ext3,ntfs,FAT32"
print "\t\t<confirmation>\tSpecify 'PleaseEraseMyData' if you really mean it"
@@ -245,14 +245,15 @@
elif cmd == "diag":
f=d.dumpDiagnostics()
print "diagnostics in ", f
- if args[1] == "print":
- f=open( f )
- data = f.read()
- key = ord(data[0]) ^ 0x2d
- datam = ''.join(map( lambda x: chr(ord(x)^key), data ))
- print datam
- f.close()
+ elif cmd == "diagprint":
+ f=open( args[1] )
+ data = f.read()
+ key = ord(data[0]) ^ 0x2d
+ datam = ''.join(map( lambda x: chr(ord(x)^key), data ))
+ print datam
+ f.close()
+
elif cmd == "format":
if len(args) < 3 :
print 'This is guaranteed to erase your disk, so you must say: PleaseEraseMyData'
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|