搜尋此網誌

2011年5月31日 星期二

EFI Shell commands -- MAP(顯示或定義映像在定義名稱與裝置管理函式之間)

Displays or defines mappings between user defined names and device handles.

MAP [-d ]
MAP [[-r | -u][-v][-c][-f][-t ][sname]]
MAP [sname handle | mapname]
    -d       - Delete a mapping
    -r       - Reset to default mappings
    -u       - Update mappings
    -v       - Display verbose mapping information
    sname    - User defined mapping name (wildcards are permitted)
    handle   - The number of handle, which is same as dumped from 'dh' command
    -c       - Display the consistent mapping name
    -f       - Display the normal mapping name(not consistent mapping)
    -t       - Display the device mapping name according to the device type:
                 fp   - Floppy
                 hd   - Hard Disk
                 cd   - CD-ROM
               Types can be combined by putting a comma between two types.
               Spaces are not allowed between types.
    mapname  - Mapped name for the device followed by a postfix ':'

Note:
    1.  The consistent mapping is persistent across the mapping reset and the
        system reboot.
    2.  Only characters and numbers are allowed inside of sname.
    3.  Redirection is not allowed when running map because we do not know the
        file system before mapping is done.
    4.  Output redirection is not supported for 'map -r' usage.
    5.  Option '-u' will only add/delete the mappings for new/removed devices.
        The unchanged device mappings with user-defined mappings are unchanged.
        The current dir, if current device is not changed, will also be
        preserved.

Examples:

* To reset the mapping table to the default mappings:
shell〉 map -r
Device mapping table
  f4    :UnknownDevice - Alias fs0 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  fs0   :UnknownDevice - Alias f4 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  blk0  :UnknownDevice - Alias f4 fs0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

* To display all mappings in the device mapping table:
Shell〉 map
Device mapping table
  f4    :UnknownDevice - Alias fs0 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  fs0   :UnknownDevice - Alias f4 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  blk0  :UnknownDevice - Alias f4 fs0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

* To display verbose mapping table information:
Shell〉 map -v
Device mapping table
  f4     Consist Name f4
         Other Name   fs0 blk0
         Handle       5F: Fs DiskIo BlkIo WinNtDriverIo
         Media Type   UnknownDevice
         Removable    NO
         Current Dir  \
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  fs0    Consist Name f4
         Other Name   blk0
         Handle       5F: Fs DiskIo BlkIo WinNtDriverIo
         Media Type   UnknownDevice
         Removable    NO
         Current Dir  \
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  blk0   Consist Name f4
         Other Name   fs0
         Handle       5F: Fs DiskIo BlkIo WinNtDriverIo
         Media Type   UnknownDevice
         Removable    NO
         Current Dir  \
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

* To assign fs0 another name:
Shell〉 map floppy fs0:
  floppy:UnknownDevice - Alias f4 fs0 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

* To display information about the mapped name:
Shell〉 map floppy
  floppy:UnknownDevice - Alias f4 fs0 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

* To operate with the mapped name:
Shell〉 floppy:
floppy:\〉 ls

* To delete a mapped name:
Shell〉 map -d floppy
Shell〉 map
Device mapping table
  f4    :UnknownDevice - Alias fs0 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  fs0   :UnknownDevice - Alias f4 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  blk0  :UnknownDevice - Alias f4 fs0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

* To display all the mapped names starting with 'f':
Shell〉 map f*
Device mapping table
  f4    :UnknownDevice - Alias fs0 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)
  fs0   :UnknownDevice - Alias f4 blk0
         Device Path  VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BCFA-0080C73C8881)

沒有留言:

張貼留言