This is the second part of the post on usage information for the MMI3G QNX vdev-logvolmgr binary describing the LVM protocol command interface:
Code:
**** Commands received through /dev/lvm (Protocol Version 1.0.0):
-------------------------------------------------------------------------------
MOUNT STORAGE DEVICE AS <storage name> FROM <device> TO <mountpoint> [add_opt]
-------------------------------------------------------------------------------
Create a new storage device handle named <storage name>, that is using the
device specified at <device> to create the mountpoint at <mountpoint>.
Additional options may be passed to the MOUNT command to modify the behavior
of the command:
LINK - Only create a symbolic link from <device> to <mountpoint>. This should
be used if the device in question is already mounted. If LINK is NOT given,
the LVM will always attempt to mount the given device as if it contains
a qnx4 file system.
READ - Treat the storage device as read only. This changes the behaviour of the
LVM so that it will try to remount devices as readable in case the user wants
to install or copy something to a storage device. If LINK is specified, nothing
special will happen as soon as the mount command is executed. The LVM
will try to make sure it is able to write to the disk whenever a user
requests it, regardless of the LINK statement.
REPAIR - In case this option is specified, the LVM will attempt to remount
read only storage devices to repair file data bases. In case a the storage
device isn't specified as RAW, remounting will occur as soon as the LVM
fails to load a config.nfm - in that case, the LVM will try to generate a
new package database on the storage device using a built-in default config.nfm.
The -r option may be specified on the command line to force this behavior even
if the caller doesn't specify this option. File system checks will not occur on
devices that have been mounted as read only.
RAW - By passing this option, the LVM will treat the storage device as a device
that contains user defined data only, and will not search for a package database
when mounting it.
The outcome is undefined if other parameters are given.
-------------------------------------------------------------------------------
DISMOUNT STORAGE DEVICE <storage name>
-------------------------------------------------------------------------------
Dismounts the storage device specified by <storage name>. The caller should
only attempt to dismount storage devices that have been mounted before.
-------------------------------------------------------------------------------
DISPLAY RESOURCES
-------------------------------------------------------------------------------
Shows a list of resources currently maintained by the LVM. The list sent as a
type 30x response (see below), and holds the following comma seperated data
(in order of appearance):
name of the resource
type of the resource (LVM_TPE_PACKAGE, LVM_TPE_STORAGE, LVM_TPE_FILEDEF)
residence of the resource (storage device it's residing on)
location of the resource (current system path)
version information
condition (2 = GOOD, 3 = BAD, etc.. tbd.)
size of the resource
free space in the resource (set to zero for everything but LVM_TPE_STORAGE).
file type of the resource (as specified in the file definition)
user flags (TODO)
copy protection flag (TODO)
-------------------------------------------------------------------------------
INSTALL PACKAGE <package name> [FROM STORAGE DEVICE <storage source>] TO
STORAGE DEVICE <storage target>
-------------------------------------------------------------------------------
Installs a package that is residing on <storage source> to <storage target>.
If the optional source storage device is not given, the first package that
is matching the name <package name> will be used to attempt the installation.
It's recommended to always specify the source storage device.
Note: The LVM currently does not check for storage space constrains. Please
make sure that there is enough space to install the requested file definitions.
The information provided by the DISPLAY RESOURCES and DISPLAY PACKAGES commands
may be used to determine if there is enough space to install a package.
-------------------------------------------------------------------------------
REPLACE PACKAGE <package name> ON STORAGE DEVICE <storage target> WITH PACKAGE
<new package name> ON STORAGE DEVICE <storage source>
-------------------------------------------------------------------------------
Installs a new package, but deletes another package in the process. Use this
function if you plan to do an incremental update and there is a package
on the storage device that may share some file definitions with the new
package you're planning to install. Files that belong to the old package only
will be deleted, files belonging to both the old and the new package will
remain on the storage device. Additionally, all files of the new package will
be installed in case they are not yet on the specified target storage device.
Note: Additional notes of the INSTALL command also apply here.
-------------------------------------------------------------------------------
REMOVE PACKAGE <package name> FROM <storage name>
-------------------------------------------------------------------------------
Removes a package from a storage device. Also all file definitions that are
referenced by the package will be removed from the same storage device,
as long as they are not currently referenced by another package.
-------------------------------------------------------------------------------
ACTIVATE PACKAGE <pkgname> ON STORAGE DEVICE <storage name> AT <activation point>
-------------------------------------------------------------------------------
Activate package <pkgname> residing on the storage device <storage name>
into the device tree. A package can only be activated once. The result of
attempting to activate a package more than once is not defined.
-------------------------------------------------------------------------------
DISCARD ORPHANED FILE DEFINITIONS ON STORAGE DEVICE <storage name>
-------------------------------------------------------------------------------
Removes file definitions that are not referenced by a package from a storage
device. May be used to clean up a storage device with broken packet
definitions.
-------------------------------------------------------------------------------
INITIALISE STORAGE DEVICE <storage name>
-------------------------------------------------------------------------------
Recreates structures on the storage device. ALL data on the storage device,
starting from the path given in the mount command, will be deleted.
-------------------------------------------------------------------------------
EXECUTE QUICK CHECK OF PACKAGE <package name> ON STORAGE DEVICE <storage name>
-------------------------------------------------------------------------------
Checks the given package by executing a quick check. The file definition in the
must contain quick check information.
-------------------------------------------------------------------------------
EXECUTE THOROUGH CHECK OF PACKAGE <package name> ON STORAGE DEVICE
<storage name>
-------------------------------------------------------------------------------
Checks the given package by executing a thorough check. The file definition
in the must contain either a crc or md5 field. Md5 is preferred, while CRC32
is for testing only.
Please consult the description for Options -n and -P regarding the thorough
check, which may be used as a background check by specifying chunks that
should be checked. As soon as all chunks are checked, the LVM will decide if
the file is OK for use or not.
-------------------------------------------------------------------------------
DELETE FILE DEFINITION <fdef name> FROM STORAGE DEVICE <storage name>
-------------------------------------------------------------------------------
Removes a file definition regardless of its state, as long the the storage
device specified is fully operable. Use this to delete individual file
definitions in case they are not referenced by a package on the same storage
device and they take up space needed by a new installation.
-------------------------------------------------------------------------------
DISPLAY PACKAGE <package name> [ON STORAGE DEVICE <storage name>]
-------------------------------------------------------------------------------
Shows information about a package. If no <storage name> is given, the first
packet matching the name will be used to display the information. The command
outputs information about the referenced file definitions and version
information of the package.
The Data sent is in a KEY=VALUE format. Multiple sending of a KEY with the same
name indicates that there is more than one item of type KEY in the package.
Example:
301 SEQ00,FILEDEF=XAC_ECE_12_0_2,/fs/cd0/pkgdb/XAC_ECE_12_0_2/XAC.DB,CD0
301 SEQ01,FILEDEF=GDB_ECE_12_0_2,/fs/cd0/pkgdb/GDB_ECE_12_0_2/GDB.GDB,CD0
301 SEQ02,FILEDEF=LIT_ECE_12_0_2,/fs/cd0/pkgdb/LIT_ECE_12_0_2/LIT.DB,CD0
301 SEQ03,FILEDEF=SPEECH_2000_12_0_2,/fs/cd0/pkgdb/SPEECH21202/SPEECH.DB,CD0
FILEDEF keys contain the name of the File Definition as referenced by the
package, and if a file definition with the required name exists in the system
and is known to the LVM, the path to the file(s) in the file definition, aswell
as the name of the storage device the file is on.
If the file definitions hasn't been found in the system, the fields will contain
the string ##INVALID##.
301 SEQ04, MARKET=ECE
MARKET informs the client about the market the package is intended for.
301 SEQ05, VERSION=12.3.2
VERSION informs the user about the version of the package.
301 SEQ05, CUSTOMER=ExampleCustomer
CUSTOMER informs the user about the customer the package is intended for.
301 SEQ06, TYPE=base
TYPE informs the user about the type of the package.
301 SEQ07, SET=daisychain,2,1,<NEXTPACKAGENAME>
SET informs the user about the type of set, if there is any.
-------------------------------------------------------------------------------
SET KEY <keyname> TO VALUE <value>
-------------------------------------------------------------------------------
Set a configuration key to the given value.
-------------------------------------------------------------------------------
+++ABORT
-------------------------------------------------------------------------------
Abort the current operation. This command must be sent as a complete string,
or abortion will not occur. The operation may be finished before the abortion
comes into effect.
**** Messages send by the LVM
The LVM generates messages (terminated by LF) if it receives messages. There
are certain types of messages, prefixed by a three digit number and a
whitespace. The data following the whitespace must be interpreted depending
on the message prefix.
-------------------------------------------------------------------------------
200 RESULT <errcode>,<errcodetxt>,<errreason>,<errdesc>
-------------------------------------------------------------------------------
!!NOTE: The error codes have been changed. Please refer to the error code in
the supplemental information!!
The result of a user-triggered operation; "errcode" can be 1 or 0 depending on
if an error occured or not. "errcodetxt" is either "ERROR" or "OK".
"errreason" is a decimal value assuming the value of an extended error code,
and gives the caller a possible explaination as to why the error occured:
0 No error occured, or the error condition is not known
1 Not enough memory to perform the requested operation
2 There is an error in the command syntax
3 Internal failure
4 A resource referenced by the command does not exist.
5 The resource already exists
"errdesc" assumes any text, and may contain more detailed error information
for human users. It's not intended to be checked by a machine.
-------------------------------------------------------------------------------
201 <event>
-------------------------------------------------------------------------------
This is an asynchronious event and informs the user about a changing condition
in response to a command. At the moment, there is only one event defined:
-------------------------------------------------------------------------------
201 CONFIGURATION CHANGED,<info>
-------------------------------------------------------------------------------
This happens whenever the internal configuration, dependencies or conditions
change. After receiving that message, the users should re-read the
resource list by sending a DISPLAY RESOURCE command, and, if interested in
packet relationships, a DISPLAY PACKAGE command for every package the client is
interested in.
This message will also be generated if a user on another LVM connection caused
a configuration change. In that case, the <info> field will be filled and set
to "REMOTE". Please note that the comma will NOT appear in the message
if there is no additional info to be sent.
-------------------------------------------------------------------------------
203 START PROCESS <process>, STEPS <numsteps>
-------------------------------------------------------------------------------
A new process named <process> has been started. The process is going to need
<numsteps> to complete. Processes are run nested, meaning that one process
may result in a nother process being spawned.
-------------------------------------------------------------------------------
204 END PROCESS <process>
-------------------------------------------------------------------------------
A process named <process> has been completed.
-------------------------------------------------------------------------------
202 PROCESS PROGRESS <process>,<curstep> of <steps>
-------------------------------------------------------------------------------
Status update on a currently running process named <process>. Step <curstep>
of <steps> is currently being processed.
-------------------------------------------------------------------------------
205 LVM PROTOCOL VERSION <version>
-------------------------------------------------------------------------------
Always sent after establishing a connection the the LVM, this message informs
the user about the protocol specification currently used by the client. The
version is tranferred in the form of MA.MI.CH, where MA is the major number of
the protocol specification, MI is the minor version and CH is a change index
in the protocol handling that should not affect the compatibility between two
components.
Added functions or added return data justifies a change in the MI field,
changes that affect the order of return data or removal/renaming of instructions
requires a change in the MA field. Additional data should be ignored as long
as the MA field doesn't change.
-------------------------------------------------------------------------------
206 <topic>
-------------------------------------------------------------------------------
This message may be sent by the LVM to indicate the topic of the upcoming
process, and may be used by the user to find out what exactly is currently
being handled by the LVM.
-------------------------------------------------------------------------------
210 <percent>,<bytetotal>,<bytedone>,<timetotal>,<timedone>,<datarate>
-------------------------------------------------------------------------------
This message may be sent by the LVM during an INSTALL operation. It indicates
the overall progress in percent with regard to the file size of the all the
file definitions being transferred.
If a value is not supported by the current LVM, there will be no characters
between the commas.
This message may also be generated during REPLACE operations, as REPLACE
operations will invoke an INSTALL operation internally.
-------------------------------------------------------------------------------
3XX SEQ<seqno>,<anydata>
-------------------------------------------------------------------------------
This message is sent in response to DISPLAY commands. "anydata" contains
command specific data. The caller is supposed to know the format of the
response. D data is transferred in a comma seperated list, or in a
KEY=VALUE fashion, depending on the command. The <seqno> assumes the value
of the current line in the output stream. This type of message is only send
if a process sent a request command before. X may take a value from 00-99.
Bookmarks