033d4c mkdumprd: fix multiple issues with get_ssh_size

Authored and Committed by liutgnu 2 years ago
1 file changed. 6 lines added. 7 lines removed.
    mkdumprd: fix multiple issues with get_ssh_size
    
    upstream: fedora
    resolves: bz2003832
    conflict: none
    
    commit d6449e7293fb426ebb9f0bffee57d675573a64d6
    Author: Kairui Song <kasong@redhat.com>
    Date:   Wed Aug 4 17:15:42 2021 +0800
    
        mkdumprd: fix multiple issues with get_ssh_size
    
        Currently get_ssh_size is not working as expected, it should return the
        target's available space, but it will include df's header row string as
        the result. Fix this issue by only use the last output line.
    
        And the _opt variable will be used as args so it should be an array.
    
        Also remove the awk call, just use `df --output=avail` instead.
    
        Signed-off-by: Kairui Song <kasong@redhat.com>
        Acked-by: Philipp Rudo <prudo@redhat.com>
    
    Signed-off-by: Tao Liu <ltao@redhat.com>
    
        
file modified
+6 -7