Seagate / TCGstorageAPI

API for TCG Storage operations on SAS and SATA Self-Encrypting Drives
Apache License 2.0
22 stars 16 forks source link

Issue seen on Configure Band when setting of ‘rangestart’ is large, same issue for 'rangelength' #37

Open ouyangweifeng opened 2 years ago

ouyangweifeng commented 2 years ago

Describe the bug When use configure band for a 20T drive, found an issue that can't configure that band if the setting of 'rangestart' is large, same issue for 'rangelength'. The program shows 'ValueError: Unknown format code 'x' for object of type 'str'.

To Reproduce Steps to reproduce the behavior:

  1. Build steps

  2. Run steps

  3. Python script and CLI command that's being used.
    python3 sed_cli.py --device=/dev/sde --operation=configureband --bandno=3 --rangestart=0x48C400000 --rangelength=0x74706DB0 --lockonreset=true --keymanager=json

  4. Type of drive interface that's being used (SAS/SATA/NVMe). => SATA.

  5. Product type ( Eg: Seagate, Micron). => Seagate

Expected behavior Band should be configured successfully without error. See Screenshot for the good case.

Screenshots

image

Desktop (please complete the following information):

Additional context The Max LBA of this 20T drive is 0x9185FFFFF.