• [PATCH] ofpathname: Add missing substring extraction of devpart in l2of

    From John Paul Adrian Glaubitz@21:1/5 to All on Sun Apr 18 10:20:01 2021
    l2of_vd() contains the necessary bits to append the partition number
    to the resulting OFPATH, but it does not actually extract the partition
    number from the logical device path in the first place. This adds the
    missing substring extraction of the partition number from the logical
    device path so that the partition number is appended to OFPATH when
    the logical device is a partition.

    Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    ---
    scripts/ofpathname | 6 ++++++
    1 file changed, 6 insertions(+)

    diff --git a/scripts/ofpathname b/scripts/ofpathname
    index 906cee9..cee4dd2 100755
    --- a/scripts/ofpathname
    +++ b/scripts/ofpathname
    @@ -564,6 +564,12 @@ l2of_vd()
    err $ERR_NOT_CONFIG
    fi

    + # partition number: N in vd*N
    + local devpart="${DEVICE##*[a-z]}"
    + if [[ $devpart = $DEVICE ]]; then
    + devpart='' # no partition number
    + fi
    +
    local link=`get_link "device"`
    if [[ -z $link ]]; then
    err $ERR_NO_SYSFS_DEVINFO
    --
    2.31.0

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tyrel Datwyler@21:1/5 to John Paul Adrian Glaubitz on Sat May 22 02:10:02 2021
    On 4/18/21 1:05 AM, John Paul Adrian Glaubitz wrote:
    l2of_vd() contains the necessary bits to append the partition number
    to the resulting OFPATH, but it does not actually extract the partition number from the logical device path in the first place. This adds the
    missing substring extraction of the partition number from the logical
    device path so that the partition number is appended to OFPATH when
    the logical device is a partition.

    Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
    ---

    Patch applied to powerpc-utils/next branch.

    https://github.com/ibm-power-utilities/powerpc-utils/commit/9104167a0ee93989757326136b94daad585cd87c

    Thanks,
    -Tyrel

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)