Opened 18 years ago
Closed 18 years ago
#341 closed defect (fixed)
vditool don't recognize lowercase command name
Reported by: | JusTiCe8 | Owned by: | |
---|---|---|---|
Component: | other | Version: | VirtualBox 1.3.8 |
Keywords: | Cc: | ||
Guest type: | other | Host type: | other |
Description
vditool svn (and propably 1.3.8) failed to manage lowercase command string, example:
-- LD_LIBRARY_PATH=. ./vditool dump example_disk.vdi vditool Copyright (c) 2004-2005 InnoTek Systemberatung GmbH.
Syntax error: Invalid command!
Usage: vditool <Command> [Params] Commands and params: --
It's surprising according to call to 'ascii2upper' function. While debugging this I dsicover: szCmd = "dump\000f\203¯¥\212\004\bô\017ò§" before call o ascii2upper and is equal to "+<47\000f\203¯¥\212\004\bô\017ò§" after call.
the line "*psz += 'A' - 'z';" (line 39) seems to be really wrong in character case convertion.
It will be better to use strcasecmp instead of strcmp in swtich statement, and perhaps better to use a RTStr* function (to be sure to don't miss UTF strings).
Thanks for noticing. I thought that it was an intentional annoyance to force upper case commands, but it turns out it's not. Fixed in svn.
vditool is mainly an internal development tool (that's why it's not part of the distribution). All relevant functionality is (or will be soon) available through VBoxManage.